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§
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