rok::core::crypto::sha2
SHA-2 (FIPS 180-4): SHA-256, SHA-384 and SHA-512, chosen by
HashAlgorithm; Digest is a running hash.
Structs
Digest
pub struct DigestA running hash of a HashAlgorithm. A value: copying it forks the
running hash (a transcript hash read mid-way).
pub const fn new(alg: HashAlgorithm) -> Digestpub const fn algorithm(self) -> HashAlgorithmpub fn update(ref self, data: Bytes)pub const fn finish(self) -> List<u8>
Enums
HashAlgorithm
pub enum HashAlgorithmA SHA-2 function chosen at run time (HMAC, HKDF, signatures, TLS).
Sha256Sha384Sha512pub const fn output_len(self) -> usizepub const fn block_len(self) -> usizepub fn digest(self, data: Bytes) -> List<u8>