pub struct SecretKey(/* private fields */);Expand description
Symmetric 256-bit AEAD key material.
Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn from_slice(bytes: &[u8]) -> Result<Self, DntKeyError>
pub fn from_slice(bytes: &[u8]) -> Result<Self, DntKeyError>
Copies a key from a slice with strict length validation.
Sourcepub fn expose_key(&self) -> &[u8; 32]
pub fn expose_key(&self) -> &[u8; 32]
Exposes key bytes to the AEAD implementation.
Trait Implementations§
impl Eq for SecretKey
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnsafeUnpin for SecretKey
impl UnwindSafe for SecretKey
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