Class Fernet


  • public class Fernet
    extends Object
    • Method Detail

      • getInstance

        public static Fernet getInstance()
      • setFernetKey

        public void setFernetKey​(String fernetKey)
      • isKeyDefined

        public boolean isKeyDefined()
      • encrypt

        public String encrypt​(@NonNull
                              @NonNull String secret)
      • isTokenized

        public static boolean isTokenized​(String tokenized)
      • decryptIfApplies

        public String decryptIfApplies​(String value)
        Decrypts value without throwing an Exception in case it is not a Fernet encrypted value
      • encryptIfApplies

        public String encryptIfApplies​(@NonNull
                                       @NonNull String secret)
        Encrypt value without throwing an Exception in case it is not encrypted