crypto-sodium-0.0.3.1: Easy-and-safe-to-use high-level cryptography based on Sodium
Safe HaskellNone
LanguageHaskell2010

Crypto.Pwhash.Internal

Description

Tools for hashing passwords.

Synopsis

Documentation

data Algorithm Source #

Secure hashing algorithm.

Constructors

Argon2i_1_3

Argon2i version 1.3

Argon2id_1_3

Argon2id version 1.3

data Params Source #

Secure-hashing parameters.

Constructors

Params 

Fields

Instances

Instances details
Eq Params Source # 
Instance details

Defined in Crypto.Pwhash.Internal

Methods

(==) :: Params -> Params -> Bool #

(/=) :: Params -> Params -> Bool #

Ord Params Source # 
Instance details

Defined in Crypto.Pwhash.Internal

Show Params Source # 
Instance details

Defined in Crypto.Pwhash.Internal

type Salt a = SizedByteArray CRYPTO_PWHASH_SALTBYTES a Source #

Salt used for password hashing.

This type is parametrised by the actual data type that contains bytes. This can be, for example, a ByteString.

pwhash Source #

Arguments

:: forall passwd salt n hash. (ByteArrayAccess passwd, ByteArrayAccess salt, ByteArrayN n hash, CRYPTO_PWHASH_BYTES_MIN <= n, n <= CRYPTO_PWHASH_BYTES_MAX) 
=> Algorithm

Hashing algorithm.

-> Params

Hashing parameters.

-> passwd

Password to hash.

-> Salt salt

Hashing salt.

-> IO (Maybe hash) 

Securely hash a password.

This is crypto_pwhash, it can be used for key derivation.