Modifier and Type | Method and Description |
---|---|
static Key |
Key.generateKey(Random random)
Generate a random key
|
Modifier and Type | Method and Description |
---|---|
static Token |
Token.generate(Random random,
Key key,
byte[] payload)
Generate a new Fernet token.
|
static Token |
Token.generate(Random 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.
|
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.
|
<T> T |
Token.validateAndDecrypt(Key key,
Validator<T> validator)
Check the validity of this token.
|
Modifier and Type | Method and Description |
---|---|
default T |
Validator.validateAndDecrypt(Collection<? extends Key> keys,
Token token)
Check the validity of a token against a pool of keys.
|
<T> T |
Token.validateAndDecrypt(Collection<? extends Key> keys,
Validator<T> validator)
Check the validity of this token against a collection of keys.
|
Copyright © 2017. All rights reserved.