Initializer
init(pseudoRandomFunction:iterations:)
Creates a PBKDF2 password hasher.
init(pseudoRandomFunction: PBKDF2Hasher.HashFunction = .sha256, iterations: Int? = nil)
Parameters
pseudoRandomFunctionThe hash function to use. Defaults to SHA-256.
iterationsThe number of PBKDF2 iterations. If nil, uses OWASP-recommended defaults based on the hash function.
Discussion
Note
The parameters passed in here will only be used for hashing, verification will rely solely on the parameters inside of the hash.