Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tools for hashing passwords.
Synopsis
- data Algorithm
- data Params = Params {}
- type Salt a = SizedByteArray CRYPTO_PWHASH_SALTBYTES a
- pwhash :: forall passwd salt n hash. (ByteArrayAccess passwd, ByteArrayAccess salt, ByteArrayN n hash, CRYPTO_PWHASH_BYTES_MIN <= n, n <= CRYPTO_PWHASH_BYTES_MAX) => Algorithm -> Params -> passwd -> Salt salt -> IO (Maybe hash)
Documentation
Secure hashing algorithm.
Argon2i_1_3 | Argon2i version 1.3 |
Argon2id_1_3 | Argon2id version 1.3 |
Secure-hashing parameters.
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
.
:: 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.