| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Pwhash.Internal
Description
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.
Constructors
| Argon2i_1_3 | Argon2i version 1.3 |
| Argon2id_1_3 | Argon2id version 1.3 |
Instances
| Eq Algorithm Source # | |
| Ord Algorithm Source # | |
| Show Algorithm Source # | |
Secure-hashing parameters.
Constructors
| Params | |
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.
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.