pub enum HashAlgorithm {
Shake256,
Shake128,
CShake256,
}
Expand description
Hash algorithm types
Variants§
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub fn output_size(&self) -> usize
pub fn output_size(&self) -> usize
Get the output size for this algorithm
Sourcepub fn validate_input(&self, data: &[u8]) -> Result<()>
pub fn validate_input(&self, data: &[u8]) -> Result<()>
Sourcepub fn create_hash(&self) -> Box<dyn Hash>
pub fn create_hash(&self) -> Box<dyn Hash>
Create a hash instance for this algorithm
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 · Source§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 PartialEq for HashAlgorithm
impl PartialEq 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§
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