Struct blake2b_simd::Hash [−][src]
pub struct Hash { /* fields omitted */ }
A finalized BLAKE2 hash, with constant-time equality.
Methods
impl Hash
[src]
impl Hash
pub fn bytes(&self) -> &[u8]
[src]
pub fn bytes(&self) -> &[u8]
Get the hash as a slice of bytes. Note that slices don't provide constant-time equality checks, so avoid this method if you're using BLAKE2b as a MAC.
pub fn hex(&self) -> ArrayString<[u8; 128]>
[src]
pub fn hex(&self) -> ArrayString<[u8; 128]>
Convert the hash to a lowercase hexadecimal
ArrayString
.
Trait Implementations
impl Clone for Hash
[src]
impl Clone for Hash
fn clone(&self) -> Hash
[src]
fn clone(&self) -> Hash
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 Copy for Hash
[src]
impl Copy for Hash
impl PartialEq for Hash
[src]
impl PartialEq for Hash
This implementation is constant time, if the two hashes are the same length.
fn eq(&self, other: &Hash) -> bool
[src]
fn eq(&self, other: &Hash) -> 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 PartialEq<[u8]> for Hash
[src]
impl PartialEq<[u8]> for Hash
This implementation is constant time, if the slice is the same length as the hash.
fn eq(&self, other: &[u8]) -> bool
[src]
fn eq(&self, other: &[u8]) -> 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 Hash
[src]
impl Eq for Hash
impl AsRef<[u8]> for Hash
[src]
impl AsRef<[u8]> for Hash
impl Debug for Hash
[src]
impl Debug for Hash