#[non_exhaustive]pub enum Cipher {
None,
Aes256Ctr,
}
Expand description
Cipher algorithms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
source§impl Cipher
impl Cipher
sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Get the string identifier which corresponds to this algorithm.
sourcepub fn key_and_iv_size(self) -> Option<(usize, usize)>
pub fn key_and_iv_size(self) -> Option<(usize, usize)>
Get the key and IV size for this cipher in bytes.
sourcepub fn block_size(self) -> usize
pub fn block_size(self) -> usize
Get the block size for this cipher in bytes.
sourcepub fn padding_len(self, input_size: usize) -> usize
pub fn padding_len(self, input_size: usize) -> usize
Compute the length of padding necessary to pad the given input to the block size.
Trait Implementations§
source§impl Ord for Cipher
impl Ord for Cipher
source§impl PartialOrd for Cipher
impl PartialOrd for Cipher
impl Copy for Cipher
impl Eq for Cipher
impl StructuralPartialEq for Cipher
Auto Trait Implementations§
impl Freeze for Cipher
impl RefUnwindSafe for Cipher
impl Send for Cipher
impl Sync for Cipher
impl Unpin for Cipher
impl UnwindSafe for Cipher
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)