[][src]Module sodiumoxide::crypto::pwhash::scryptsalsa208sha256

crypto_pwhash_scryptsalsa208sha256, a particular combination of Scrypt, Salsa20/8 and SHA-256

Structs

HashedPassword

HashedPasswordis a password verifier generated from a password

MemLimit

MemLimit represents the maximum amount of RAM that the functions in this module will use, in bytes.

OpsLimit

OpsLimit represents the maximum number of computations to perform when using the functions in this module.

Salt

Salt used for password hashing

Constants

HASHEDPASSWORDBYTES

Number of bytes in a HashedPassword.

MEMLIMIT_INTERACTIVE

Safe base line for MemLimit for interactive password hashing.

MEMLIMIT_SENSITIVE

MemLimit for highly sensitive data.

OPSLIMIT_INTERACTIVE

Safe base line for OpsLimit for interactive password hashing.

OPSLIMIT_SENSITIVE

OpsLimit for highly sensitive data.

SALTBYTES

Number of bytes in a Salt.

STRPREFIX

All HashedPasswords start with this string.

Functions

derive_key

The derive_key() function derives a key from a password and a Salt

derive_key_interactive

derive_key_interactive() is a shortcut function for derive_key() with interactive limits (i.e. using derive_key() with OPSLIMIT_INTERACTIVE and MEMLIMIT_INTERACTIVE)

derive_key_sensitive

derive_key_sensitive() is a shortcut function for derive_key() with sensitive limits (i.e. using derive_key() with OPSLIMIT_SENSITIVE and MEMLIMIT_SENSITIVE)

gen_salt

gen_salt() randombly generates a new Salt for key derivation

pwhash

The pwhash() returns a HashedPassword which includes:

pwhash_interactive

pwhash_interactive() is a shortcut function for pwhash() with interactive limits (i.e. using pwhash() with OPSLIMIT_INTERACTIVE and MEMLIMIT_INTERACTIVE)

pwhash_sensitive

pwhash_sensitive() is a shortcut function for pwhash() with sensitive limits (i.e. using pwhash() with OPSLIMIT_SENSITIVE and MEMLIMIT_SENSITIVE)

pwhash_verify

pwhash_verify() verifies that the password str_ is a valid password verification string (as generated by pwhash()) for passwd