Struct UnboundKey
pub struct UnboundKey {
inner: LessSafeKey,
}
Expand description
An AEAD key without a designated role or nonce sequence.
Fields§
§inner: LessSafeKey
Implementations§
§impl UnboundKey
impl UnboundKey
pub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8],
) -> Result<UnboundKey, Unspecified>
pub fn new( algorithm: &'static Algorithm, key_bytes: &[u8], ) -> Result<UnboundKey, Unspecified>
Constructs a UnboundKey
.
Fails if key_bytes.len() != algorithm.key_len()
.
pub fn algorithm(&self) -> &'static Algorithm
pub fn algorithm(&self) -> &'static Algorithm
The key’s AEAD algorithm.
Trait Implementations§
§impl Debug for UnboundKey
impl Debug for UnboundKey
§impl From<Okm<'_, &'static Algorithm>> for UnboundKey
impl From<Okm<'_, &'static Algorithm>> for UnboundKey
§fn from(okm: Okm<'_, &'static Algorithm>) -> UnboundKey
fn from(okm: Okm<'_, &'static Algorithm>) -> UnboundKey
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnboundKey
impl RefUnwindSafe for UnboundKey
impl Send for UnboundKey
impl Sync for UnboundKey
impl Unpin for UnboundKey
impl UnwindSafe for UnboundKey
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