[][src]Enum zbox::MemLimit

pub enum MemLimit {

Password hash memory limit.

It represents a maximum amount of memory required to perform password hashing.

It is used with OpsLimit.

For interactive, online operations, OpsLimit::Interactive and MemLimit::Interactive provide base line for these two parameters. This requires 64 MB of dedicated RAM. Higher values may improve security.

Alternatively, OpsLimit::Moderate and MemLimit::Moderate can be used. This requires 256 MB of dedicated RAM, and takes about 0.7 seconds on a 2.8 Ghz Core i7 CPU.

For highly sensitive data and non-interactive operations, OpsLimit::Sensitive and MemLimit::Sensitive can be used. With these parameters, deriving a key takes about 3.5 seconds on a 2.8 Ghz Core i7 CPU and requires 1024 MB of dedicated RAM.

See https://download.libsodium.org/doc/password_hashing/the_argon2i_function for more details.



64 MB


256 MB


1024 MB

Trait Implementations

impl Into<i32> for MemLimit[src]

impl PartialEq<MemLimit> for MemLimit[src]

fn ne(&self, other: &Rhs) -> bool

This method tests for !=.

impl Copy for MemLimit[src]

impl Clone for MemLimit[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<i32> for MemLimit[src]

impl Default for MemLimit[src]

impl Debug for MemLimit[src]

impl Serialize for MemLimit[src]

impl<'de> Deserialize<'de> for MemLimit[src]

Auto Trait Implementations

impl Send for MemLimit

impl Sync for MemLimit

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>,