MCPcopy
hub / github.com/ory/keto / Hasher

Interface Hasher

oryx/hasherx/hasher.go:8–14  ·  view source on GitHub ↗

Hasher provides methods for generating and comparing password hashes.

Source from the content-addressed store, hash-verified

6
7// Hasher provides methods for generating and comparing password hashes.
8type Hasher interface {
9 // Generate returns a hash derived from the password or an error if the hash method failed.
10 Generate(ctx context.Context, password []byte) ([]byte, error)
11
12 // Understands returns whether the given hash can be understood by this hasher.
13 Understands(hash []byte) bool
14}
15
16type HashProvider interface {
17 Hasher() Hasher

Callers 1

mainFunction · 0.65

Implementers 3

Bcryptoryx/hasherx/hasher_bcrypt.go
PBKDF2oryx/hasherx/hasher_pbkdf2.go
Argon2oryx/hasherx/hasher_argon2.go

Calls

no outgoing calls

Tested by

no test coverage detected