feat: authsession service
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package ports
|
||||
|
||||
// CodeHasher hashes cleartext confirmation codes and compares later user input
|
||||
// against stored hashes.
|
||||
type CodeHasher interface {
|
||||
// Hash returns the stored representation for code.
|
||||
Hash(code string) ([]byte, error)
|
||||
|
||||
// Compare reports whether hash matches code.
|
||||
Compare(hash []byte, code string) (bool, error)
|
||||
}
|
||||
Reference in New Issue
Block a user