#[repr(u32)]pub enum Algorithm {
None = 0,
Aes128Xts = 1,
Aes256Xts = 2,
Aes256Gcm = 3,
}Expand description
Supported cipher algorithms.
Variants§
Implementations§
Source§impl Algorithm
impl Algorithm
Sourcepub fn new_cipher(&self) -> Result<Cipher, Error>
pub fn new_cipher(&self) -> Result<Cipher, Error>
Create a new cipher object.
Sourcepub fn is_encryption_enabled(&self) -> bool
pub fn is_encryption_enabled(&self) -> bool
Check whether data encryption is enabled or not.
Sourcepub fn key_length(&self) -> usize
pub fn key_length(&self) -> usize
Get key size of the encryption algorithm.
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnwindSafe for Algorithm
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