pub struct Digest(pub [u8; 64]);Expand description
Digest-structure
Tuple Fields§
§0: [u8; 64]Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Digest
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Digest
serde only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<Digest, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Digest, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Index<Range<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
impl Index<Range<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..b] == y[a..b]. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Source§impl Index<RangeFrom<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeFrom<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..] == y[a..]. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Source§impl Index<RangeFull> for Digest
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeFull> for Digest
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[] == y[]. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Source§impl Index<RangeTo<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeTo<usize>> for Digest
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[..b] == y[..b]. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
Source§impl Ord for Digest
impl Ord for Digest
Source§impl PartialOrd for Digest
impl PartialOrd for Digest
Source§impl Serialize for Digest
Available on crate feature serde only.
impl Serialize for Digest
serde only.