pub struct AesKey(/* private fields */);Expand description
The key used to encrypt or decrypt cipher blocks.
Implementations§
Source§impl AesKey
impl AesKey
Sourcepub fn new_encrypt(key: &[u8]) -> Result<AesKey, KeyError>
pub fn new_encrypt(key: &[u8]) -> Result<AesKey, KeyError>
Prepares a key for encryption.
§Failure
Returns an error if the key is not 128, 192, or 256 bits.
This corresponds to AES_set_encrypt_key.
Sourcepub fn new_decrypt(key: &[u8]) -> Result<AesKey, KeyError>
pub fn new_decrypt(key: &[u8]) -> Result<AesKey, KeyError>
Prepares a key for decryption.
§Failure
Returns an error if the key is not 128, 192, or 256 bits.
This corresponds to AES_set_decrypt_key.
Auto Trait Implementations§
impl Freeze for AesKey
impl RefUnwindSafe for AesKey
impl Send for AesKey
impl Sync for AesKey
impl Unpin for AesKey
impl UnsafeUnpin for AesKey
impl UnwindSafe for AesKey
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