pub trait HmacKey: Send + Sync {
    // Required methods
    fn sign(&self, data: &[u8], signature_out: &mut [u8]);
    fn signature_len(&self) -> usize;
    fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>;
}
Expand description

A key for signing with HMAC-based algorithms

Required Methods§

source

fn sign(&self, data: &[u8], signature_out: &mut [u8])

Method for signing a message

source

fn signature_len(&self) -> usize

Length of sign’s output

source

fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

Method for verifying a message

Implementations on Foreign Types§

source§

impl HmacKey for Key

source§

fn sign(&self, data: &[u8], out: &mut [u8])

source§

fn signature_len(&self) -> usize

source§

fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

Implementors§