pub struct UnboundCipherKey {
algorithm: &'static Algorithm,
key_bytes: Buffer<'static, &'static [u8]>,
}
Expand description
A key bound to a particular cipher algorithm.
Fields§
§algorithm: &'static Algorithm
§key_bytes: Buffer<'static, &'static [u8]>
Implementations§
Source§impl UnboundCipherKey
impl UnboundCipherKey
Sourcepub fn new(
algorithm: &'static Algorithm,
key_bytes: &[u8],
) -> Result<Self, Unspecified>
pub fn new( algorithm: &'static Algorithm, key_bytes: &[u8], ) -> Result<Self, Unspecified>
Constructs an UnboundCipherKey
.
§Errors
Unspecified
ifkey_bytes.len()
does not match the length required byalgorithm
.
Trait Implementations§
Source§impl Debug for UnboundCipherKey
impl Debug for UnboundCipherKey
Source§impl TryInto<SymmetricCipherKey> for UnboundCipherKey
impl TryInto<SymmetricCipherKey> for UnboundCipherKey
Source§type Error = Unspecified
type Error = Unspecified
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for UnboundCipherKey
impl RefUnwindSafe for UnboundCipherKey
impl Send for UnboundCipherKey
impl Sync for UnboundCipherKey
impl Unpin for UnboundCipherKey
impl UnwindSafe for UnboundCipherKey
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