Enum encryptfile::OutputOption [] [src]

pub enum OutputOption {
    AllowOverwrite,
    IncludeKeyMetadata,
}

Output options.

Variants

AllowOverwrite

If the output file exists and this is set, it will be overwritten. If this is NOT set and the file exists, encryption/decryption will return an error.

This setting is disabled by default.

IncludeKeyMetadata

Controls whether metadata about the generated key is included (as cleartext) in the output file. For example, if scrypt is used, the metadata contains the Log(N),R,and P parameters vaues that were provided to scrypt to generate the key. The metadata does not include the original password text or salt.

This provides a margin of safety in case the original parameters are lost and the file needs to be decrypted; however, it also make it easier for an attacker to run brute force attacks since he will know what parameters to use. This setting only affects password types that use the PasswordKeyGenMethod enum.

This setting enabled by default.

Trait Implementations

Derived Implementations

impl Hash for OutputOption

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Eq for OutputOption

impl PartialEq for OutputOption

fn eq(&self, __arg_0: &OutputOption) -> bool

fn ne(&self, __arg_0: &OutputOption) -> bool

impl Clone for OutputOption

fn clone(&self) -> OutputOption

fn clone_from(&mut self, source: &Self)