pub struct EncryptedData {
pub nonce: [u8; 12],
pub ciphertext: Vec<u8>,
}Expand description
Encrypted data with nonce
Fields§
§nonce: [u8; 12]Nonce used for encryption
ciphertext: Vec<u8>Encrypted ciphertext (includes auth tag)
Implementations§
Source§impl EncryptedData
impl EncryptedData
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SecurityError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SecurityError>
Deserialize from bytes
Trait Implementations§
Source§impl Clone for EncryptedData
impl Clone for EncryptedData
Source§fn clone(&self) -> EncryptedData
fn clone(&self) -> EncryptedData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EncryptedData
impl RefUnwindSafe for EncryptedData
impl Send for EncryptedData
impl Sync for EncryptedData
impl Unpin for EncryptedData
impl UnsafeUnpin for EncryptedData
impl UnwindSafe for EncryptedData
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