Enum AesSalt
pub enum AesSalt
A custom salt that can be used instead of a randomly generated one when encrypting files with AES. This is not recommended, but it can be useful for testing or for reproducible encryption results.
Variants
-
Aes128([u8; 8]) AES 128 salt
-
Aes192([u8; 12]) AES 192 salt
-
Aes256([u8; 16]) AES 256 salt
Implementations
impl AesSalt
fn try_new(mode: AesMode, salt: &[u8]) -> Result<Self, Error>Creates a new
AesSaltwith the givenmodeandsalt. The length ofsaltmust be exactly one-half the key length for the givenmode, otherwise an error is returned.Errors
Returns an error if the length of
saltis too short for the givenmode.
Trait Implementations
impl Clone for AesSalt
fn clone(&self) -> Self
impl Copy for AesSalt
impl Debug for AesSalt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for AesSalt
impl PartialEq for AesSalt
fn eq(&self, other: &Self) -> bool