Uses of Class
com.macasaet.fernet.Key

  • Uses of Key in com.macasaet.fernet

    Methods in com.macasaet.fernet that return Key 
    Modifier and Type Method Description
    static Key Key.generateKey()
    Generate a random key
    static Key Key.generateKey​(java.security.SecureRandom random)
    Generate a random key
    Methods in com.macasaet.fernet with parameters of type Key 
    Modifier and Type Method Description
    static Token Token.generate​(Key key, byte[] payload)
    Convenience method to generate a new Fernet token.
    static Token Token.generate​(Key key, java.lang.String plainText)
    Convenience method to generate a new Fernet token with a string payload.
    static Token Token.generate​(java.security.SecureRandom random, Key key, byte[] payload)
    Generate a new Fernet token.
    static Token Token.generate​(java.security.SecureRandom random, Key key, java.lang.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, java.time.Instant earliestValidInstant, java.time.Instant latestValidInstant)  
    default T Validator.validateAndDecrypt​(Key key, Token token)
    Check the validity of the token then decrypt and deserialise the payload.
    Method parameters in com.macasaet.fernet with type arguments of type Key 
    Modifier and Type Method Description
    <T> T Token.validateAndDecrypt​(java.util.Collection<? extends Key> keys, Validator<T> validator)
    Check the validity of this token against a collection of keys.
    default T Validator.validateAndDecrypt​(java.util.Collection<? extends Key> keys, Token token)
    Check the validity of a token against a pool of keys.