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
digest: Digest
The encapsulated sha256::Digest
Methods
impl Digest
[src]
fn as_slice(&self) -> [u8; 32]
returns the actual data of the digest (from inside the sha256::Digest)
Trait Implementations
impl Debug for Digest
[src]
impl PartialEq for Digest
[src]
fn eq(&self, __arg_0: &Digest) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Digest) -> bool
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.
fn clone(&self) -> Digest
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Drop for Digest
[src]
fn drop(&mut self)
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