Struct blake2_c::Digest
[−]
[src]
pub struct Digest { pub bytes: ArrayVec<[u8; 64]>, }
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]
pub fn hex(&self) -> ArrayString<[u8; 128]>
[src]
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]
fn clone(&self) -> Digest
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Digest
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Digest
[src]
This implementation is constant time, if the two digests are the same length.
fn eq(&self, other: &Digest) -> bool
[src]
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]
This method tests for !=
.