Trait SignatureMethod

Source
pub trait SignatureMethod {
    type Sign: Sign;

    // Required method
    fn sign_with(
        self,
        client_secret: &str,
        token_secret: Option<&str>,
    ) -> Self::Sign;
}
Expand description

Types that represent a signature method.

This is used to construct a Self::Sign and carries configuration data for them.

Required Associated Types§

Source

type Sign: Sign

The algorithm used by this signature method to sign a signature base string.

Required Methods§

Source

fn sign_with( self, client_secret: &str, token_secret: Option<&str>, ) -> Self::Sign

Creates a Self::Sign that signs a signature base string with the given shared-secrets.

Implementors§

Source§

impl SignatureMethod for HmacSha1

Available on crate feature hmac-sha1 only.
Source§

impl<W> SignatureMethod for Plaintext<W>
where W: Default + Display + Write,