public final class UtilsCryptography extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CIPHER_ALGORITHM
Name of the transformation.
|
static String |
DEFAULT_SECRET_KEY
Default key to encrypt/decrypt.
|
static String |
KEY_ALGORITHM
Name of the secret-key algorithm to be associated with the given key
material.
|
private static org.apache.logging.log4j.Logger |
LOG
Logger.
|
private static String |
MSG_TPL
Template message.
|
private static String |
MSG_TPL2
Template message.
|
Modifier | Constructor and Description |
---|---|
private |
UtilsCryptography()
Private constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
decrypt(String encryptedInput)
Decrypts the string with the DEFAULT_SECRET_KEY.
|
static String |
decrypt(String encryptedInput,
String secretKey)
Decrypts the string with a custom secret key.
|
static String |
encrypt(String str)
Encrypts the string with the DEFAULT_SECRET_KEY.
|
static String |
encrypt(String str,
String secretKey)
Encrypts the string with a specific secret key.
|
public static final String CIPHER_ALGORITHM
public static final String KEY_ALGORITHM
public static final String DEFAULT_SECRET_KEY
private static final org.apache.logging.log4j.Logger LOG
private static final String MSG_TPL
private static final String MSG_TPL2
public static String decrypt(String encryptedInput)
encryptedInput
- string to decrypt.public static String decrypt(String encryptedInput, String secretKey)
encryptedInput
- string to decrypt.secretKey
- the secret key.public static String encrypt(String str)
str
- string to encryptCopyright © 2017–2020 CNES. All rights reserved.