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 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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 244 bytes