Trait ockam_vault_core::Hasher[][src]

pub trait Hasher {
    fn sha256<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<[u8; 32]>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn hkdf_sha256<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        salt: &'life1 Secret,
        info: &'life2 [u8],
        ikm: Option<&'life3 Secret>,
        output_attributes: SmallBuffer<SecretAttributes>
    ) -> Pin<Box<dyn Future<Output = Result<SmallBuffer<Secret>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
; }
Expand description

A trait for hashing data into fixed length output

Required methods

Compute the SHA-256 digest given input data

Derive multiple output Secrets with given attributes using the HKDF-SHA256 using specified salt, input key material and info.

Implementors