pub enum S2kParams {
Unprotected,
LegacyCfb {
sym_alg: SymmetricKeyAlgorithm,
iv: Vec<u8>,
},
Aead {
sym_alg: SymmetricKeyAlgorithm,
aead_mode: AeadAlgorithm,
s2k: StringToKey,
nonce: Vec<u8>,
},
Cfb {
sym_alg: SymmetricKeyAlgorithm,
s2k: StringToKey,
iv: Vec<u8>,
},
MalleableCfb {
sym_alg: SymmetricKeyAlgorithm,
s2k: StringToKey,
iv: Vec<u8>,
},
}
Variants§
Implementations§
Source§impl S2kParams
impl S2kParams
Sourcepub fn new_default<R: Rng + CryptoRng>(rng: R, key_version: KeyVersion) -> Self
pub fn new_default<R: Rng + CryptoRng>(rng: R, key_version: KeyVersion) -> Self
Create a new default set of parameters and initialises relevant randomized values.
For v6 keys:
- Ocb with AES256
- Argon2 derivation (with parameter choice (2) from https://www.rfc-editor.org/rfc/rfc9106#name-parameter-choice)
For v4 keys:
- AES256
- CFB
- Iterated and Salted with 224 rounds
Trait Implementations§
impl Eq for S2kParams
impl StructuralPartialEq for S2kParams
Auto Trait Implementations§
impl Freeze for S2kParams
impl RefUnwindSafe for S2kParams
impl Send for S2kParams
impl Sync for S2kParams
impl Unpin for S2kParams
impl UnwindSafe for S2kParams
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