pub struct AsconXof128 { /* private fields */ }Expand description
Ascon-XOF128 extensible-output function (NIST SP 800-232 §5.2).
Produces variable-length output. Rate = 64 bits (8 bytes), capacity = 256 bits. Shorter outputs are prefixes of longer ones.
Implements the Xof trait.
§One-shot API
ⓘ
use crypto::ascon::AsconXof128;
let mut output = [0u8; 32];
AsconXof128::hash(b"hello world", &mut output);§Incremental API
ⓘ
use crypto::{ascon::AsconXof128, Xof};
let mut xof = AsconXof128::new();
xof.absorb(b"hello ");
xof.absorb(b"world");
let mut out = [0u8; 32];
xof.squeeze(&mut out);Implementations§
Trait Implementations§
Source§impl Clone for AsconXof128
impl Clone for AsconXof128
Source§fn clone(&self) -> AsconXof128
fn clone(&self) -> AsconXof128
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Drop for AsconXof128
impl Drop for AsconXof128
Source§impl Xof for AsconXof128
impl Xof for AsconXof128
Auto Trait Implementations§
impl Freeze for AsconXof128
impl RefUnwindSafe for AsconXof128
impl Send for AsconXof128
impl Sync for AsconXof128
impl Unpin for AsconXof128
impl UnsafeUnpin for AsconXof128
impl UnwindSafe for AsconXof128
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