pub enum XOFFactory {
SHAKE128(SHAKE128),
SHAKE256(SHAKE256),
}Variants§
Trait Implementations§
Source§impl AlgorithmFactory for XOFFactory
impl AlgorithmFactory for XOFFactory
Source§fn default_128_bit() -> Self
fn default_128_bit() -> Self
Get the default configured algorithm at the 128-bit security level.
Source§fn default_256_bit() -> Self
fn default_256_bit() -> Self
Get the default configured algorithm at the 256-bit security level.
Source§impl Default for XOFFactory
impl Default for XOFFactory
Source§impl XOF for XOFFactory
impl XOF for XOFFactory
Source§fn hash_xof(self, data: &[u8], result_len: usize) -> Vec<u8> ⓘ
fn hash_xof(self, data: &[u8], result_len: usize) -> Vec<u8> ⓘ
A static one-shot API that digests the input data and produces
result_len bytes of output.Source§fn hash_xof_out(self, data: &[u8], output: &mut [u8]) -> usize
fn hash_xof_out(self, data: &[u8], output: &mut [u8]) -> usize
A static one-shot API that digests the input data and produces
result_len bytes of output.
Fills the provided output slice.fn absorb(&mut self, data: &[u8]) -> Result<(), HashError>
Source§fn absorb_last_partial_byte(
&mut self,
partial_byte: u8,
num_partial_bits: usize,
) -> Result<(), HashError>
fn absorb_last_partial_byte( &mut self, partial_byte: u8, num_partial_bits: usize, ) -> Result<(), HashError>
Switches to squeezing.
Source§fn squeeze(&mut self, num_bytes: usize) -> Result<Vec<u8>, HashError>
fn squeeze(&mut self, num_bytes: usize) -> Result<Vec<u8>, HashError>
Can be called multiple times.
Source§fn squeeze_out(&mut self, output: &mut [u8]) -> Result<usize, HashError>
fn squeeze_out(&mut self, output: &mut [u8]) -> Result<usize, HashError>
Can be called multiple times.
Fills the provided output slice.
Source§fn squeeze_partial_byte_final(self, num_bits: usize) -> Result<u8, HashError>
fn squeeze_partial_byte_final(self, num_bits: usize) -> Result<u8, HashError>
Squeezes a partial byte from the XOF.
Output will be in the top
num_bits bits of the returned u8 (ie Big Endian).
This is a final call and consumes self.fn squeeze_partial_byte_final_out( self, num_bits: usize, output: &mut u8, ) -> Result<(), HashError>
Source§fn max_security_strength(&self) -> SecurityStrength
fn max_security_strength(&self) -> SecurityStrength
Returns the maximum security strength that this KDF is capable of supporting, based on the underlying primitives.
Auto Trait Implementations§
impl Freeze for XOFFactory
impl RefUnwindSafe for XOFFactory
impl Send for XOFFactory
impl Sync for XOFFactory
impl Unpin for XOFFactory
impl UnwindSafe for XOFFactory
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