Structure
PBKDF2Hasher
A password hasher using PBKDF2 with configurable hash function and iterations.
struct PBKDF2Hasher
Overview
The output format is a modular crypt format string: $pbkdf2-<algorithm>$<iterations>$<base64-salt>$<base64-hash>
This format is compatible with passlib and other common PBKDF2 implementations. See: https://passlib.readthedocs.io/en/stable/lib/passlib.hash.pbkdf2_digest.html
Topics
Initializers
init(pseudoRandomFunction: PBKDF2Hasher.HashFunction, iterations: Int?)Creates a PBKDF2 password hasher.
Instance Methods
func hash<Password>(Password) throws -> [UInt8]Hashes a password using PBKDF2.func verify<Password, Digest>(Password, created: Digest) throws -> BoolVerifies a password against a hash.
Enumerations
Relationships
Conforms To
PasswordHasherSwift.SendableSwift.SendableMetatype