pub struct EncryptionMetadata {
pub nonce: [u8; 12],
}Expand description
The metadata that can be used for the encryption process.
§Examples
use tindercrypt::metadata::EncryptionMetadata;
// Generate a struct instance for the encryption metadata.
let enc_meta1 = EncryptionMetadata::generate();
// Generate a second struct instance. The nonce should be different this time.
let enc_meta2 = EncryptionMetadata::generate();
assert_ne!(enc_meta1.nonce, enc_meta2.nonce);Fields§
§nonce: [u8; 12]The nonce value for the AEAD algorithms.
Nonces are unique, 96-bit values, which are filled with random data.
Implementations§
Trait Implementations§
Source§impl Clone for EncryptionMetadata
impl Clone for EncryptionMetadata
Source§fn clone(&self) -> EncryptionMetadata
fn clone(&self) -> EncryptionMetadata
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 moreSource§impl Debug for EncryptionMetadata
impl Debug for EncryptionMetadata
Source§impl PartialEq for EncryptionMetadata
impl PartialEq for EncryptionMetadata
impl Copy for EncryptionMetadata
impl StructuralPartialEq for EncryptionMetadata
Auto Trait Implementations§
impl Freeze for EncryptionMetadata
impl RefUnwindSafe for EncryptionMetadata
impl Send for EncryptionMetadata
impl Sync for EncryptionMetadata
impl Unpin for EncryptionMetadata
impl UnwindSafe for EncryptionMetadata
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