pub(crate) enum SymmetricCipherKey {
Aes128 {
enc_key: AES_KEY,
dec_key: AES_KEY,
},
Aes192 {
enc_key: AES_KEY,
dec_key: AES_KEY,
},
Aes256 {
enc_key: AES_KEY,
dec_key: AES_KEY,
},
ChaCha20 {
raw_key: ChaCha20Key,
},
}
Variants§
Implementations§
Source§impl SymmetricCipherKey
impl SymmetricCipherKey
fn aes(key_bytes: &[u8]) -> Result<(AES_KEY, AES_KEY), Unspecified>
pub(crate) fn aes128(key_bytes: &[u8]) -> Result<Self, Unspecified>
pub(crate) fn aes192(key_bytes: &[u8]) -> Result<Self, Unspecified>
pub(crate) fn aes256(key_bytes: &[u8]) -> Result<Self, Unspecified>
pub(crate) fn chacha20(key_bytes: &[u8]) -> Result<Self, Unspecified>
pub(crate) fn encrypt_block(&self, block: Block) -> Block
Trait Implementations§
Source§impl Drop for SymmetricCipherKey
impl Drop for SymmetricCipherKey
Source§impl TryInto<SymmetricCipherKey> for UnboundCipherKey
impl TryInto<SymmetricCipherKey> for UnboundCipherKey
Source§type Error = Unspecified
type Error = Unspecified
The type returned in the event of a conversion error.
impl Send for SymmetricCipherKey
impl Sync for SymmetricCipherKey
Auto Trait Implementations§
impl Freeze for SymmetricCipherKey
impl RefUnwindSafe for SymmetricCipherKey
impl Unpin for SymmetricCipherKey
impl UnwindSafe for SymmetricCipherKey
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