buddy.sign.compact

Compact high level message signing implementation.

It has high influence by django’s cryptographic library and json web signature/encryption but with focus on have a compact representation. It’s build on top of fantastic ptaoussanis/nippy serialization library.

This singing implementation is not very efficient with small messages, but is very space efficient with big messages.

The purpose of this implementation is for secure message transfer, it is not really good candidate for auth token because of not good space efficiency for small messages.

*signers-map*

dynamic

List of supported signing algorithms

decode

(decode data key & [{:keys [alg compress max-age], :or {alg :hs256, compress true}}])

Given a signed message, verify it and return the decoded data.

encode

(encode data key & [{:keys [alg compress], :or {alg :hs256, compress true}}])

Sign arbitrary length string/byte array using compact sigining method.

sign

(sign data key & [{:keys [alg compress], :or {alg :hs256, compress true}}])

Sign arbitrary length string/byte array using compact sigining method.

unsign

(unsign data key & [{:keys [alg compress max-age], :or {alg :hs256, compress true}}])

Given a signed message, verify it and return the decoded data.