Class EncryptionUtils


  • public class EncryptionUtils
    extends Object
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • EncryptionUtils

        public EncryptionUtils()
    • Method Detail

      • saltedHash

        public static String saltedHash​(String clearTextValue)
      • checkSaltedHash

        public static boolean checkSaltedHash​(String clearTextValue,
                                              String hashedValue)
      • decrypt

        public static Integer decrypt​(String value,
                                      int defaultValue)
      • 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 the KeyStore type by the provided input stream. Implementation details are taken from KeyStore.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.