#[repr(i32)]pub enum HashAlgorithm {
Sha256 = 0,
Sha384 = 1,
Sha512 = 2,
Sha3_256 = 3,
Sha3_384 = 4,
Sha3_512 = 5,
Shake128 = 6,
Shake256 = 7,
}Expand description
Hash algorithms.
Variants§
Sha256 = 0
SHA-256
Sha384 = 1
SHA-384
Sha512 = 2
SHA-512
Sha3_256 = 3
SHA3-256
Sha3_384 = 4
SHA3-384
Sha3_512 = 5
SHA3-512
Shake128 = 6
SHAKE128 (variable output)
Shake256 = 7
SHAKE256 (variable output)
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub const fn digest_size(self) -> Option<usize>
pub const fn digest_size(self) -> Option<usize>
Get digest size in bytes, or None for variable-length (SHAKE).
Trait Implementations§
Source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
Source§fn clone(&self) -> HashAlgorithm
fn clone(&self) -> HashAlgorithm
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashAlgorithm
impl Debug for HashAlgorithm
Source§impl Display for HashAlgorithm
impl Display for HashAlgorithm
Source§impl Hash for HashAlgorithm
impl Hash for HashAlgorithm
Source§impl PartialEq for HashAlgorithm
impl PartialEq for HashAlgorithm
impl Copy for HashAlgorithm
impl Eq for HashAlgorithm
impl StructuralPartialEq for HashAlgorithm
Auto Trait Implementations§
impl Freeze for HashAlgorithm
impl RefUnwindSafe for HashAlgorithm
impl Send for HashAlgorithm
impl Sync for HashAlgorithm
impl Unpin for HashAlgorithm
impl UnwindSafe for HashAlgorithm
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)