botan-low-0.0.1.0: Low-level Botan bindings
Copyright(c) Leo D 2023
LicenseBSD-3-Clause
Maintainerleo@apotheca.io
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Botan.Low.PwdHash

Description

Derive a key from a passphrase

Synopsis

Password hashing

pwdhash Source #

Arguments

:: PBKDFName

algo: PBKDF algorithm, e.g., Scrypt or "PBKDF2(SHA-256)"

-> Int

param1: the first PBKDF algorithm parameter

-> Int

param2: the second PBKDF algorithm parameter (may be zero if unneeded)

-> Int

param3: the third PBKDF algorithm parameter (may be zero if unneeded)

-> Int

out_len: the desired length of the key to produce

-> ByteString

passphrase: the password to derive the key from

-> ByteString

salt[]: a randomly chosen salt

-> IO ByteString

out[]: buffer to store the derived key, must be of out_len bytes

Warning: pwdhash and pwdhashTimed's parameter order may be inconsistent. See botan-lowtestBotanLowPwdHashSpec.hs for more information.

pwdhashTimed Source #

Arguments

:: PBKDFName

algo: PBKDF algorithm, e.g., Scrypt or "PBKDF2(SHA-256)"

-> Int

msec: the desired runtime in milliseconds

-> Int

out_len: the desired length of the key to produce

-> ByteString

passphrase: the password to derive the key from

-> ByteString

salt[]: a randomly chosen salt

-> IO (Int, Int, Int, ByteString)

out[]: buffer to store the derived key, must be of out_len bytes

Warning: pwdhash and pwdhashTimed's parameter order may be inconsistent. See botan-lowtestBotanLowPwdHashSpec.hs for more information.

Password hashing algorithms