[][src]Enum zbox::OpsLimit

pub enum OpsLimit {
    Interactive,
    Moderate,
    Sensitive,
}

Password hash operation limit.

It represents a maximum amount of computations to perform. Higher level will require more CPU cycles to compute. It is often used with MemLimit.

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.

Variants

Interactive
Moderate
Sensitive

Trait Implementations

impl Clone for OpsLimit[src]

impl Copy for OpsLimit[src]

impl Debug for OpsLimit[src]

impl Default for OpsLimit[src]

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

impl From<i32> for OpsLimit[src]

impl Into<i32> for OpsLimit[src]

impl PartialEq<OpsLimit> for OpsLimit[src]

impl Serialize for OpsLimit[src]

impl StructuralPartialEq for OpsLimit[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.