#[repr(u8)]
#[non_exhaustive]
pub enum HashType {
Blake2b512,
SHA256,
SHA512,
SHA3_256,
}Expand description
Defines all hashing algorithms, which are implemented in zff.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Blake2b512
The Blake2b-512 algorithm with the encoding value 0.
SHA256
The SHA256 algorithm with the encoding value 1.
SHA512
The SHA512 algorithm with the encoding value 2.
SHA3_256
The SHA3-256 (keccak) algorithm with the encoding value 3.
Implementations
sourceimpl HashType
impl HashType
sourcepub fn default_len(&self) -> usize
pub fn default_len(&self) -> usize
returns the default length of the appropriate hash (as bits).
Trait Implementations
impl Eq for HashType
impl StructuralEq for HashType
impl StructuralPartialEq for HashType
Auto Trait Implementations
impl RefUnwindSafe for HashType
impl Send for HashType
impl Sync for HashType
impl Unpin for HashType
impl UnwindSafe for HashType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more