Package de.xima.fc.utils
Class EncryptionUtils
- java.lang.Object
-
- de.xima.fc.utils.EncryptionUtils
-
public class EncryptionUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description EncryptionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckSaltedHash(String clearTextValue, String hashedValue)static byte[]decrypt(byte[] value, byte[] defaultValue)static Stringdecrypt(String value)static Integerdecrypt(String value, int defaultValue)static byte[]encrypt(byte[] value)static Stringencrypt(Integer value)static Stringencrypt(String value)static org.jasypt.encryption.pbe.PooledPBEByteEncryptorgetBinaryEncryptor()static StringgetKeyStoreTypeByFileName(InputStream input)Determines theKeyStoretype by the provided input stream.static org.jasypt.encryption.pbe.PooledPBEStringEncryptorgetStringEncryptor()static StringsaltedHash(String clearTextValue)
-
-
-
Method Detail
-
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
@Nullable public static String getKeyStoreTypeByFileName(InputStream input)
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.
-
-