Trait jws::Signer[][src]

pub trait Signer {
    fn set_header_params(&self, header: &mut JsonObject);
fn compute_mac(
        encoded_protected_header: &[u8],
        encoded_payload: &[u8]
    ) -> Result<Vec<u8>>; }
Expand description

A signer for JWS messages.

Required methods

Set the header parameters to indicate how the message should be verified.

This is the first step in the signing process, since the encoded headers will end up in the signature if they are added to the protected header.

Compute the Message Authentication Code for the encoded protected header and encoded payload.

The returned MAC must be plain bytes, not hex or base64 encoded.