[][src]Struct pwbox::sodium::Scrypt

pub struct Scrypt {
    pub opslimit: u32,
    pub memlimit: u32,
}
This is supported on crate feature exonum_sodiumoxide only.

Scrypt key derivation function parameterized as per libsodium, i.e., via opslimit (computational hardness) and memlimit (RAM consumption).

Fields

opslimit: u32

Parameter determining the computational hardness of the KDF.

The default value is 1 << 19.

memlimit: u32

Parameter determining the RAM consumption of the KDF. The value is approximately equal to RAM volume in bytes, so, for example, the default value means memory consumption ~16 MB.

The default value is 1 << 24.

Implementations

impl Scrypt[src]

pub const fn interactive() -> Self[src]

Returns the "interactive" scrypt parameters as defined in libsodium.

pub const fn light() -> Self[src]

Returns "light" scrypt parameters as used in Ethereum keystore implementations.

pub const fn sensitive() -> Self[src]

Returns the "sensitive" scrypt parameters as defined in libsodium.

Trait Implementations

impl Clone for Scrypt[src]

impl Copy for Scrypt[src]

impl Debug for Scrypt[src]

impl Default for Scrypt[src]

fn default() -> Self[src]

Returns the "interactive" scrypt parameters as defined in libsodium.

impl DeriveKey for Scrypt[src]

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

impl From<ScryptCompat> for Scrypt[src]

impl Serialize for Scrypt[src]

Auto Trait Implementations

impl RefUnwindSafe for Scrypt

impl Send for Scrypt

impl Sync for Scrypt

impl Unpin for Scrypt

impl UnwindSafe for Scrypt

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: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.