pub enum SymKey {
Aes256Cbc {
key: [u8; 32],
iv: [u8; 16],
},
Aes256Ctr {
key: [u8; 32],
iv: [u8; 16],
},
}
Variants§
Aes256Cbc
A key for the AES 256 cipher in Cipher Block Chaining mode. Note that this includes the initialization vector, so that a value of this variant contains all the information needed to fully initialize a cipher context.
Aes256Ctr
A key for the AES 256 cipher in counter mode.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for SymKey
impl<'de> Deserialize<'de> for SymKey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'_enum> From<&'_enum SymKey> for SymKeyKind
impl<'_enum> From<&'_enum SymKey> for SymKeyKind
source§fn from(val: &'_enum SymKey) -> SymKeyKind
fn from(val: &'_enum SymKey) -> SymKeyKind
Converts to this type from the input type.
source§impl From<SymKey> for SymKeyKind
impl From<SymKey> for SymKeyKind
source§fn from(val: SymKey) -> SymKeyKind
fn from(val: SymKey) -> SymKeyKind
Converts to this type from the input type.
source§impl PartialEq<SymKey> for SymKey
impl PartialEq<SymKey> for SymKey
impl Eq for SymKey
impl StructuralEq for SymKey
impl StructuralPartialEq for SymKey
impl ZeroizeOnDrop for SymKey
Auto Trait Implementations§
impl RefUnwindSafe for SymKey
impl Send for SymKey
impl Sync for SymKey
impl Unpin for SymKey
impl UnwindSafe for SymKey
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> DecrypterExt for Twhere
T: Decrypter + ?Sized,
impl<T> DecrypterExt for Twhere T: Decrypter + ?Sized,
fn ser_decrypt<T: DeserializeOwned>(&self, ct: &Ciphertext<T>) -> Result<T>
source§impl<T> EncrypterExt for Twhere
T: Encrypter + ?Sized,
impl<T> EncrypterExt for Twhere T: Encrypter + ?Sized,
source§fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
Serializes the given value into a new vector, then encrypts it and returns the resulting
ciphertext.