C D E F G H I K P R S T V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
C
- com.macasaet.fernet - package com.macasaet.fernet
D
- decrypt(byte[], IvParameterSpec) - Method in class com.macasaet.fernet.Key
-
Decrypt the payload of a Fernet token.
E
- encrypt(byte[], IvParameterSpec) - Method in class com.macasaet.fernet.Key
-
Encrypt a payload to embed in a Fernet token
- equals(Object) - Method in class com.macasaet.fernet.Key
F
- finalize() - Method in class com.macasaet.fernet.Key
- fromBytes(byte[]) - Static method in class com.macasaet.fernet.Token
- fromString(String) - Static method in class com.macasaet.fernet.Token
-
Deserialise a Base64 URL Fernet token string.
G
- generate(Random, Key, byte[]) - Static method in class com.macasaet.fernet.Token
-
Generate a new Fernet token.
- generate(Random, Key, String) - Static method in class com.macasaet.fernet.Token
-
Convenience method to generate a new Fernet token with a string payload.
- generateInitializationVector(Random) - Static method in class com.macasaet.fernet.Token
- generateInitializationVectorBytes(Random) - Static method in class com.macasaet.fernet.Token
- generateKey(Random) - Static method in class com.macasaet.fernet.Key
-
Generate a random key
- getCharset() - Method in interface com.macasaet.fernet.StringObjectValidator
- getCharset() - Method in interface com.macasaet.fernet.StringValidator
- getCipherText() - Method in class com.macasaet.fernet.Token
-
Warning: modifications to the returned array will write through to this object.
- getCipherTransformation() - Method in class com.macasaet.fernet.Key
- getClock() - Method in interface com.macasaet.fernet.Validator
-
Override this method if your application uses a custom clock.
- getEncoder() - Method in class com.macasaet.fernet.Key
- getEncoder() - Method in class com.macasaet.fernet.Token
- getEncryptionAlgorithm() - Method in class com.macasaet.fernet.Key
- getEncryptionKey() - Method in class com.macasaet.fernet.Key
-
Warning: Modifying the returned byte array will write through to this object.
- getEncryptionKeySpec() - Method in class com.macasaet.fernet.Key
- getHmac() - Method in class com.macasaet.fernet.Token
-
Warning: modifications to the returned array will write through to this object.
- getInitializationVector() - Method in class com.macasaet.fernet.Token
- getMaxClockSkew() - Method in interface com.macasaet.fernet.Validator
-
Override this method to define a custom acceptable clock skew.
- getObjectValidator() - Method in interface com.macasaet.fernet.Validator
-
Implement this to define application-specific security rules.
- getSigningAlgorithm() - Method in class com.macasaet.fernet.Key
- getSigningKey() - Method in class com.macasaet.fernet.Key
-
Warning: Modifying the returned byte array will write through to this object.
- getSigningKeySpec() - Method in class com.macasaet.fernet.Key
- getStringCreator() - Method in interface com.macasaet.fernet.StringObjectValidator
-
Override this to specify an alternative way to convert binary data into a String.
- getStringTransformer() - Method in interface com.macasaet.fernet.StringObjectValidator
-
Plug in your String deserialisation method here.
- getTimestamp() - Method in class com.macasaet.fernet.Token
- getTimeToLive() - Method in interface com.macasaet.fernet.Validator
-
Override this method to define the maximum allowable age of a token.
- getTokenPrefixBytes() - Method in class com.macasaet.fernet.Key
- getTransformer() - Method in interface com.macasaet.fernet.StringObjectValidator
- getTransformer() - Method in interface com.macasaet.fernet.StringValidator
- getTransformer() - Method in interface com.macasaet.fernet.Validator
-
Implement this to define how decrypted content is deserialised into domain objects.
- getVersion() - Method in class com.macasaet.fernet.Token
H
- hashCode() - Method in class com.macasaet.fernet.Key
I
- IllegalTokenException - Exception in com.macasaet.fernet
-
This exception indicates that a Fernet token could not be created because one or more of the parameters was invalid.
- IllegalTokenException(String) - Constructor for exception com.macasaet.fernet.IllegalTokenException
- IllegalTokenException(String, Throwable) - Constructor for exception com.macasaet.fernet.IllegalTokenException
- isValidSignature(Key) - Method in class com.macasaet.fernet.Token
-
Recompute the HMAC signature of the token with the stored shared secret key.
K
- Key - Class in com.macasaet.fernet
-
A Fernet shared secret key.
- Key(byte[]) - Constructor for class com.macasaet.fernet.Key
- Key(byte[], byte[]) - Constructor for class com.macasaet.fernet.Key
-
Create a Key from individual components.
- Key(String) - Constructor for class com.macasaet.fernet.Key
P
- PayloadValidationException - Exception in com.macasaet.fernet
-
This exception indicates that a Fernet token is valid, but the payload inside fails business logic validation.
- PayloadValidationException(String) - Constructor for exception com.macasaet.fernet.PayloadValidationException
- PayloadValidationException(String, Throwable) - Constructor for exception com.macasaet.fernet.PayloadValidationException
- PayloadValidationException(Throwable) - Constructor for exception com.macasaet.fernet.PayloadValidationException
R
- read(DataInputStream, int) - Static method in class com.macasaet.fernet.Token
S
- serialise() - Method in class com.macasaet.fernet.Key
- serialise() - Method in class com.macasaet.fernet.Token
- sign(byte, Instant, IvParameterSpec, byte[]) - Method in class com.macasaet.fernet.Key
-
Generate an HMAC SHA-256 signature from the components of a Fernet token.
- sign(byte, Instant, IvParameterSpec, byte[], ByteArrayOutputStream) - Method in class com.macasaet.fernet.Key
- StringObjectValidator<T> - Interface in com.macasaet.fernet
-
A
Validator
for payloads that represent objects as Strings (e.g. - StringValidator - Interface in com.macasaet.fernet
-
A
Validator
for String payloads.
T
- Token - Class in com.macasaet.fernet
-
A Fernet token.
- Token(byte, Instant, IvParameterSpec, byte[], byte[]) - Constructor for class com.macasaet.fernet.Token
-
Initialise a new Token from raw components.
- TokenExpiredException - Exception in com.macasaet.fernet
-
This is a special case of the
TokenValidationException
that indicates that the Fernet token is invalid because the application-defined time-to-live has elapsed. - TokenExpiredException(String) - Constructor for exception com.macasaet.fernet.TokenExpiredException
- TokenExpiredException(String, Throwable) - Constructor for exception com.macasaet.fernet.TokenExpiredException
- TokenExpiredException(Throwable) - Constructor for exception com.macasaet.fernet.TokenExpiredException
- TokenValidationException - Exception in com.macasaet.fernet
-
This exception indicates that an operation (e.g.
- TokenValidationException(String) - Constructor for exception com.macasaet.fernet.TokenValidationException
- TokenValidationException(String, Throwable) - Constructor for exception com.macasaet.fernet.TokenValidationException
- TokenValidationException(Throwable) - Constructor for exception com.macasaet.fernet.TokenValidationException
- toString() - Method in class com.macasaet.fernet.Token
V
- validateAndDecrypt(Key, Token) - Method in interface com.macasaet.fernet.Validator
-
Check the validity of the token then decrypt and deserialise the payload.
- validateAndDecrypt(Key, Validator<T>) - Method in class com.macasaet.fernet.Token
-
Check the validity of this token.
- validateAndDecrypt(Key, Instant, Instant) - Method in class com.macasaet.fernet.Token
- validateAndDecrypt(Collection<? extends Key>, Token) - Method in interface com.macasaet.fernet.Validator
-
Check the validity of a token against a pool of keys.
- validateAndDecrypt(Collection<? extends Key>, Validator<T>) - Method in class com.macasaet.fernet.Token
-
Check the validity of this token against a collection of keys.
- Validator<T> - Interface in com.macasaet.fernet
-
This class validates a token according to the Fernet specification.
W
- writeTo(OutputStream) - Method in class com.macasaet.fernet.Key
-
Write the raw bytes of this key to the specified output stream.
- writeTo(OutputStream) - Method in class com.macasaet.fernet.Token
-
Write the raw bytes of this token to the specified output stream.
All Classes All Packages