Struct sha2_const::Sha384[][src]

pub struct Sha384 { /* fields omitted */ }
Expand description

The SHA-384 hash function.

The SHA-512 algorithm with the SHA-384 initialization vector, truncated to 384 bits.

Examples

const DIGEST: [u8; 48] = Sha384::new()
    .update(b"The quick brown fox ")
    .update(b"jumps over the lazy dog")
    .finalize();

assert_eq!(
    hex::encode(&DIGEST[..]),
    concat!(
        "ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c49",
        "4011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1"
    )
);

Implementations

The internal block size of the hash function.

The digest size of the hash function.

Construct a new instance.

Add input data to the hash context.

Finalize the context and compute the digest.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.