static Token |
Token.generate(Key key,
byte[] payload) |
Convenience method to generate a new Fernet token.
|
static Token |
Token.generate(Key key,
String plainText) |
Convenience method to generate a new Fernet token with a string payload.
|
static Token |
Token.generate(SecureRandom random,
Key key,
byte[] payload) |
Generate a new Fernet token.
|
static Token |
Token.generate(SecureRandom random,
Key key,
String plainText) |
Convenience method to generate a new Fernet token with a string payload.
|
boolean |
Token.isValidSignature(Key key) |
Recompute the HMAC signature of the token with the stored shared secret key.
|
<T> T |
Token.validateAndDecrypt(Key key,
Validator<T> validator) |
Check the validity of this token.
|
protected byte[] |
Token.validateAndDecrypt(Key key,
Instant earliestValidInstant,
Instant latestValidInstant) |
|
default T |
Validator.validateAndDecrypt(Key key,
Token token) |
Check the validity of the token then decrypt and deserialise the payload.
|