pub struct EncryptOptions {
pub cipher: Cipher,
pub password: Option<String>,
pub recipients: Vec<[u8; 32]>,
pub argon2: Argon2Params,
}Expand description
How to encrypt the file being written.
Fields§
§cipher: CipherThe AEAD cipher.
password: Option<String>Wrap the session key under this password.
recipients: Vec<[u8; 32]>Wrap the session key for each of these X25519 public keys.
argon2: Argon2ParamsArgon2id parameters, used when a password is set.
Implementations§
Source§impl EncryptOptions
impl EncryptOptions
Sourcepub fn password(password: impl Into<String>) -> EncryptOptions
pub fn password(password: impl Into<String>) -> EncryptOptions
Password-mode encryption with default Argon2id parameters.
Trait Implementations§
Source§impl Clone for EncryptOptions
impl Clone for EncryptOptions
Source§fn clone(&self) -> EncryptOptions
fn clone(&self) -> EncryptOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EncryptOptions
impl RefUnwindSafe for EncryptOptions
impl Send for EncryptOptions
impl Sync for EncryptOptions
impl Unpin for EncryptOptions
impl UnsafeUnpin for EncryptOptions
impl UnwindSafe for EncryptOptions
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