Package de.xima.fc.utils
Class EncryptionUtils
java.lang.Object
de.xima.fc.utils.EncryptionUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkSaltedHash
(String clearTextValue, String hashedValue) static byte[]
decrypt
(byte[] value, byte[] defaultValue) static String
static Integer
static byte[]
encrypt
(byte[] value) static String
static String
static org.jasypt.encryption.pbe.PooledPBEByteEncryptor
static String
Determines theKeyStore
type by the provided input stream.static org.jasypt.encryption.pbe.PooledPBEStringEncryptor
static String
saltedHash
(String clearTextValue)
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
EncryptionUtils
public EncryptionUtils()
-
-
Method Details
-
saltedHash
-
checkSaltedHash
-
decrypt
-
decrypt
-
encrypt
-
encrypt
-
encrypt
public static byte[] encrypt(byte[] value) -
decrypt
public static byte[] decrypt(byte[] value, byte[] defaultValue) -
getStringEncryptor
public static org.jasypt.encryption.pbe.PooledPBEStringEncryptor getStringEncryptor() -
getBinaryEncryptor
public static org.jasypt.encryption.pbe.PooledPBEByteEncryptor getBinaryEncryptor() -
getKeyStoreTypeByFileName
Determines theKeyStore
type by the provided input stream. Implementation details are taken fromKeyStore.getInstance(java.io.File, char[])
.- Parameters:
input
- the input stream providing the data of the key store.- Returns:
- the key store for the provided input stream.
-