Trait LamportDigest

Source
pub trait LamportDigest {
    // Required methods
    fn digest_size_in_bits() -> usize;
    fn digest(data: &[u8]) -> Vec<u8> ;

    // Provided methods
    fn hash(data: &MultiVec<u8, 2>) -> MultiVec<u8, 2> { ... }
    fn random(rng: impl RngCore + CryptoRng) -> MultiVec<u8, 2> { ... }
}
Expand description

A trait for providing Lamport supported digest functions.

Required Methods§

Source

fn digest_size_in_bits() -> usize

The size of the digest in bits.

Source

fn digest(data: &[u8]) -> Vec<u8>

Compute the digest on the provided data.

Provided Methods§

Source

fn hash(data: &MultiVec<u8, 2>) -> MultiVec<u8, 2>

Hash the input MultiVec data to output another MultiVec.

Source

fn random(rng: impl RngCore + CryptoRng) -> MultiVec<u8, 2>

Generate a random MultiVec data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§