[][src]Struct ring::hmac::VerificationKey

pub struct VerificationKey { /* fields omitted */ }

A key to use for HMAC authentication.

Methods

impl VerificationKey[src]

pub fn new(digest_alg: &'static Algorithm, key_value: &[u8]) -> VerificationKey[src]

Construct an HMAC verification key using the given digest algorithm and key value.

As specified in RFC 2104, if key_value is shorter than the digest algorithm's block length (as returned by digest::Algorithm::block_len, not the digest length returned by digest::Algorithm::output_len) then it will be padded with zeros. Similarly, if it is longer than the block length then it will be compressed using the digest algorithm.

pub fn digest_algorithm(&self) -> &'static Algorithm[src]

The digest algorithm for the key.

Auto Trait Implementations

impl Unpin for VerificationKey

impl Send for VerificationKey

impl Sync for VerificationKey

impl UnwindSafe for VerificationKey

impl RefUnwindSafe for VerificationKey

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]