#[non_exhaustive]pub enum KeyKind {
Aes128,
Aes192,
Aes256,
TripleDesDouble,
}Expand description
Algorithm/length class for an imported or generated key.
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 KeyKind
impl KeyKind
Sourcepub const fn clear_len(self) -> usize
pub const fn clear_len(self) -> usize
The plaintext key length in bytes: AES-128/192/256 → 16/24/32; two-key 3DES → 16. This is the value carried in the SCP03 AES PUT KEY block’s clear-key-length byte (Amendment D §7.2), which is distinct from the encrypted length — a 24-byte AES-192 key is padded to 32 ciphertext bytes, so the two only coincide for AES-128 and AES-256.
Trait Implementations§
impl Copy for KeyKind
impl Eq for KeyKind
impl StructuralPartialEq for KeyKind
Auto Trait Implementations§
impl Freeze for KeyKind
impl RefUnwindSafe for KeyKind
impl Send for KeyKind
impl Sync for KeyKind
impl Unpin for KeyKind
impl UnsafeUnpin for KeyKind
impl UnwindSafe for KeyKind
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