pub struct Key(/* private fields */);Expand description
A POLYVAL key.
Implementations§
Source§impl Key
impl Key
Sourcepub fn new(key: &[u8; 16]) -> Option<Self>
pub fn new(key: &[u8; 16]) -> Option<Self>
Creates a POLYVAL key.
It returns None if the key is all zero.
Sourcepub fn new_unchecked(key: &[u8; 16]) -> Self
pub fn new_unchecked(key: &[u8; 16]) -> Self
Creates a POLYVAL key from a known non-zero key.
§Warning
Only use this method if key is known to be non-zero.
Using an all zero key fixes the POLYVAL to zero,
regardless of the input.
Trait Implementations§
impl ZeroizeOnDrop for Key
Available on crate feature
zeroize only.Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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