Package org.openmetadata.service.fernet
Class Fernet
- java.lang.Object
-
- org.openmetadata.service.fernet.Fernet
-
public class Fernet extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringFERNET_NO_ENCRYPTIONstatic StringFERNET_PREFIX
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdecrypt(String tokenized)StringdecryptIfApplies(String value)Decrypts value without throwing an Exception in case it is not a Fernet encrypted valueStringencrypt(@NonNull String secret)StringencryptIfApplies(@NonNull String secret)Encrypt value without throwing an Exception in case it is not encryptedstatic FernetgetInstance()booleanisKeyDefined()static booleanisTokenized(String tokenized)voidsetFernetKey(String fernetKey)voidsetFernetKey(OpenMetadataApplicationConfig config)
-
-
-
Field Detail
-
FERNET_PREFIX
public static final String FERNET_PREFIX
- See Also:
- Constant Field Values
-
FERNET_NO_ENCRYPTION
public static final String FERNET_NO_ENCRYPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Fernet getInstance()
-
setFernetKey
public void setFernetKey(OpenMetadataApplicationConfig config)
-
setFernetKey
public void setFernetKey(String fernetKey)
-
isKeyDefined
public boolean isKeyDefined()
-
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
-
-