Function jws::compact::encode

source ·
pub fn encode(header: &JsonObject, payload: &[u8]) -> EncodedMessage
Expand description

Encode a message using the JWS Compact Serialization scheme.

Note that the signer should already have added it’s parameters to the header. If added later, they will not be part of the encoded message.

See encode_sign for an easier way to make sure the message is encoded with the right header parameters added.