Struct blake2_c::Digest [−][src]
A finalized BLAKE2 hash.
Digest
supports constant-time equality checks, for cases where BLAKE2 is
being used as a MAC. It uses an
ArrayVec
to hold various digest lengths without needing to allocate on the heap.
Fields
bytes: ArrayVec<[u8; 64]>
Methods
impl Digest
[src]
impl Digest
pub fn hex(&self) -> ArrayString<[u8; 128]>
[src]
pub fn hex(&self) -> ArrayString<[u8; 128]>
Convert the digest to a hexadecimal string. Because we know the maximum
length of the string in advance (2 * OUTBYTES
), we can use an
ArrayString
to avoid allocating.
Trait Implementations
impl Clone for Digest
[src]
impl Clone for Digest
fn clone(&self) -> Digest
[src]
fn clone(&self) -> Digest
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Digest
[src]
impl Debug for Digest
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Digest
[src]
impl PartialEq for Digest
This implementation is constant time, if the two digests are the same length.
fn eq(&self, other: &Digest) -> bool
[src]
fn eq(&self, other: &Digest) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for Digest
[src]
impl Eq for Digest