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 as_bytes(&self) -> &[u8]
[src]
pub fn as_bytes(&self) -> &[u8]
Convert the hash to a byte slice. Note that if you're using BLAKE2b as a MAC, you need
constant time equality, which &[u8]
doesn't provide.
pub fn to_hex(&self) -> ArrayString<[u8; 128]>
[src]
pub fn to_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