pub struct SecretKey<'a> { /* private fields */ }Expand description
A symmetric secret key used with the BLAKE3, HS256, HS384, and HS512 algorithms.
The key is borrowed, so it must outlive any signing or verification.
Signing and verification fail with Error::InvalidKey if algorithm is not one of the
supported MAC algorithms, if a BLAKE3 key is not exactly 32 bytes long, or if an HMAC key is
shorter than 16 bytes (128 bits).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SecretKey<'a>
impl<'a> RefUnwindSafe for SecretKey<'a>
impl<'a> Send for SecretKey<'a>
impl<'a> Sync for SecretKey<'a>
impl<'a> Unpin for SecretKey<'a>
impl<'a> UnsafeUnpin for SecretKey<'a>
impl<'a> UnwindSafe for SecretKey<'a>
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