Trait http_sign::SignatureAlgorithm[][src]

pub trait SignatureAlgorithm {
    fn name(&self) -> &str;
fn key_id(&self) -> &str;
fn allows_created(&self) -> bool;
fn sign(&self, data: &[u8], output: &mut dyn Write) -> Result<()>; }

The signature algorithm used to generate the HTTP message signature. The signature algorithm determines determines the hashing and signing algorithms used in computing the signature. Technically, it also determines the canonicalization algorithm used to build the string to sign, but as all signature algorithms share the same canonicalization algorithm, this trait does not include that feature.

Required methods

fn name(&self) -> &str[src]

The name which will be used for the “algorithm” signature parameter.

fn key_id(&self) -> &str[src]

The id of the key, which will be used for the “keyId” signature parameter.

fn allows_created(&self) -> bool[src]

Is the (created) signature element allowed?

fn sign(&self, data: &[u8], output: &mut dyn Write) -> Result<()>[src]

Digitally sign a block of data.

Loading content...

Implementors

impl SignatureAlgorithm for HmacSha256[src]

impl<Rand: SecureRandom> SignatureAlgorithm for EcdsaSha256<Rand>[src]

impl<Rand: SecureRandom> SignatureAlgorithm for Hs2019<Rand>[src]

impl<Rand: SecureRandom> SignatureAlgorithm for RsaSha256<Rand>[src]

Loading content...