Struct argon2::Config [] [src]

pub struct Config<'a> {
    pub ad: &'a [u8],
    pub hash_length: u32,
    pub lanes: u32,
    pub mem_cost: u32,
    pub secret: &'a [u8],
    pub thread_mode: ThreadMode,
    pub time_cost: u32,
    pub variant: Variant,
    pub version: Version,
}

Structure containing configuration settings.

Examples

use argon2::{Config, ThreadMode, Variant, Version};

let config = Config::default();
assert_eq!(config.ad, &[]);
assert_eq!(config.hash_length, 32);
assert_eq!(config.lanes, 1);
assert_eq!(config.mem_cost, 4096);
assert_eq!(config.secret, &[]);
assert_eq!(config.thread_mode, ThreadMode::Sequential);
assert_eq!(config.time_cost, 3);
assert_eq!(config.variant, Variant::Argon2i);
assert_eq!(config.version, Version::Version13);

Fields

The associated data.

The length of the resulting hash.

The number of lanes.

The amount of memory requested (KB).

The key.

The thread mode.

The number of passes.

The variant.

The version number.

Methods

impl<'a> Config<'a>
[src]

Trait Implementations

impl<'a> Clone for Config<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Config<'a>
[src]

Formats the value using the given formatter.

impl<'a> PartialEq for Config<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Default for Config<'a>
[src]

Returns the "default value" for a type. Read more