iroh_quinn_proto::crypto

Trait HmacKey

Source
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§