Uses of Class
com.macasaet.fernet.Token

  • Uses of Token in com.macasaet.fernet

    Methods in com.macasaet.fernet that return Token 
    Modifier and Type Method Description
    static Token Token.fromBytes​(byte[] bytes)
    Read a Token from bytes.
    static Token Token.fromString​(java.lang.String string)
    Deserialise a Base64 URL Fernet token string.
    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.
    Methods in com.macasaet.fernet with parameters of type Token 
    Modifier and Type Method Description
    default T Validator.validateAndDecrypt​(Key key, Token token)
    Check the validity of the token then decrypt and deserialise the payload.
    default T Validator.validateAndDecrypt​(java.util.Collection<? extends Key> keys, Token token)
    Check the validity of a token against a pool of keys.