Struct proj_crypto::symmetric::Digest [] [src]

pub struct Digest {
    pub digest: Digest,
}

A wrapper around sha256::Digest so that we can implement Drop on it to clean up the memory when it goes out of scope. This is necessary because often our shared secret keys are sha256 digests.

Fields

The encapsulated sha256::Digest

Methods

impl Digest
[src]

returns the actual data of the digest (from inside the sha256::Digest)

Trait Implementations

impl Debug for Digest
[src]

Formats the value using the given formatter.

impl PartialEq for Digest
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Digest
[src]

impl Clone for Digest
[src]

Used in hash_n_times. Unfortunately we can't derive Clone on types with destructors.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Digest
[src]

We are using sha256 digests as keys so we need to be careful with them. This function zeroes out the memory when it goes out of scope