#[repr(transparent)]pub struct Hash64(pub [u8; 64]);
Expand description
A hash wrapper.
A hash is often provided as string composed of 64 hexadecimal character (0 to 9 then A to F).
Tuple Fields§
§0: [u8; 64]
Implementations§
Source§impl Hash64
impl Hash64
Sourcepub const SIZE_IN_BYTES: usize = 64usize
pub const SIZE_IN_BYTES: usize = 64usize
Hash64 size (in bytes).
Sourcepub fn random() -> Result<Self, UnspecifiedRandError>
pub fn random() -> Result<Self, UnspecifiedRandError>
Generate a random Hash64
Sourcepub fn sha512_multipart(data_parts: &[&[u8]]) -> Hash64
pub fn sha512_multipart(data_parts: &[&[u8]]) -> Hash64
Compute SHA512 hash of any binary data on several parts
Sourcepub fn to_bytes_vector(&self) -> Vec<u8> ⓘ
pub fn to_bytes_vector(&self) -> Vec<u8> ⓘ
Convert Hash64 into bytes vector
Trait Implementations§
Source§impl Ord for Hash64
impl Ord for Hash64
Source§impl PartialOrd for Hash64
impl PartialOrd for Hash64
impl Copy for Hash64
impl Eq for Hash64
impl FromBytes for Hash64
impl StructuralPartialEq for Hash64
Auto Trait Implementations§
impl Freeze for Hash64
impl RefUnwindSafe for Hash64
impl Send for Hash64
impl Sync for Hash64
impl Unpin for Hash64
impl UnwindSafe for Hash64
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)