Class Fernet

java.lang.Object
org.openmetadata.service.fernet.Fernet

public class Fernet extends Object
  • Field Details

  • Method Details

    • getInstance

      public static Fernet getInstance()
    • setFernetKey

      public void setFernetKey(OpenMetadataApplicationConfig config)
    • 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)
    • decrypt

      public String decrypt(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