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 booleancheckSaltedHash(String clearTextValue, String hashedValue) static byte[]decrypt(byte[] value, byte[] defaultValue) static Stringstatic Integerstatic byte[]encrypt(byte[] value) static Stringstatic Stringstatic org.jasypt.encryption.pbe.PooledPBEByteEncryptorstatic StringDetermines theKeyStoretype by the provided input stream.static org.jasypt.encryption.pbe.PooledPBEStringEncryptorstatic StringsaltedHash(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 theKeyStoretype 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.
-