Interface OneTimeCodeHasher
- All Known Implementing Classes:
Sha256OneTimeCodeHasher
public interface OneTimeCodeHasher
Port that hashes one-time codes so that only the hash is stored.
-
Method Summary
-
Method Details
-
hash
Hashes a code.- Parameters:
code- the code.- Returns:
- the hash.
-
matches
Tells whether a code matches a hash, comparing in constant time.- Parameters:
code- the submitted code.hash- the stored hash.- Returns:
truewhen the code produces the hash.
-