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

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

gen_salt

gen_salt() randombly generates a new Salt for key derivation

pwhash

The pwhash() returns a HashedPassword which includes:

pwhash_verify

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