pbkdf2

Returns a binary digest for the PBKDF2 hash algorithm of data with the given salt. It iterates iterations time and produces a key of dkLen bytes. By default SHA-1 is used as hash function.

@safe pure nothrow
ubyte[]
pbkdf2
(
H = SHA1
)
(
in ubyte[] data
,
in ubyte[] salt
,
uint iterations = 4096
,
uint dkLen = 256
)
if (
isDigest!H
)

Parameters

data ubyte[]

data to hash

salt ubyte[]

salt to use to hash data

iterations uint

number of iterations to create hash with

dkLen uint

intended length of the derived key

Meta

Authors

T. Chaloupka