Skip to content

Instance Method

verify(_:created:)

Verifies a password against a hash.
func verify<Password, Digest>(_ password: Password, created digest: Digest) throws -> Bool where Password : DataProtocol, Digest : DataProtocol

Parameters

password

The password to verify.

digest

The stored hash.

Return Value

true if the password matches, false otherwise.