Interface TokenGenerator
- All Known Implementing Classes:
SecureTokenGenerator
public interface TokenGenerator
Port that creates random opaque tokens and hashes them for storage.
-
Method Summary
-
Method Details
-
generate
String generate()Creates an unguessable URL-safe token.- Returns:
- the token.
-
hash
Hashes a token with a deterministic, one-way function, so a stored hash can be looked up by the presented token.- Parameters:
token- the token value.- Returns:
- the hash.
-