Trait ockam_vault_core::Hasher[][src]

pub trait Hasher: Zeroize {
    fn sha256(&mut self, data: &[u8]) -> Result<[u8; 32]>;
fn hkdf_sha256(
        &mut self,
        salt: &Secret,
        info: &[u8],
        ikm: Option<&Secret>,
        output_attributes: SmallBuffer<SecretAttributes>
    ) -> Result<SmallBuffer<Secret>>; }

A trait for hashing data into fixed length output

Required methods

fn sha256(&mut self, data: &[u8]) -> Result<[u8; 32]>[src]

Compute the SHA-256 digest given input data

fn hkdf_sha256(
    &mut self,
    salt: &Secret,
    info: &[u8],
    ikm: Option<&Secret>,
    output_attributes: SmallBuffer<SecretAttributes>
) -> Result<SmallBuffer<Secret>>
[src]

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

Loading content...

Implementors

Loading content...