pub struct Cipher { /* private fields */ }
Expand description
Encryption is a struct that contains a dek and a nonce. The dek is a 32 byte key used to encrypt and decrypt data. The nonce is a 12 byte nonce used to encrypt and decrypt data.
Implementations§
Trait Implementations§
Source§impl Default for Cipher
If user use the default constructor, the dek and nonce should be generated randomly
impl Default for Cipher
If user use the default constructor, the dek and nonce should be generated randomly
Source§impl<'de> Deserialize<'de> for Cipher
impl<'de> Deserialize<'de> for Cipher
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
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