generatePasshash9

Create a password hash using PBKDF2

static if(BOTAN_HAS_PASSHASH9 && BOTAN_HAS_PBKDF2)
string
generatePasshash9
(
in string pass
,,
ushort work_factor = 10
,
ubyte alg_id = 1
)

Parameters

pass string

the password

rng RandomNumberGenerator

a random number generator

work_factor ushort

how much work to do to slow down guessing attacks

alg_id ubyte

specifies which PRF to use with PBKDF2 0 is HMAC(SHA-1) 1 is HMAC(SHA-256) 2 is CMAC(Blowfish) 3 is HMAC(SHA-384) 4 is HMAC(SHA-512) all other values are currently undefined

Meta