Class PBEncryptionUtils

java.lang.Object
com.aspectran.utils.PBEncryptionUtils

public abstract class PBEncryptionUtils extends Object
This class provides basic encryption/decryption capabilities to implement PBE.

Note: Note: Use StrongPasswordEncryptor for high-strength password digesting and checking.

Created: 20/10/2018

Since:
5.3.3
  • Field Details

  • Constructor Details

    • PBEncryptionUtils

      public PBEncryptionUtils()
  • Method Details

    • getAlgorithm

      public static String getAlgorithm()
    • getPassword

      public static String getPassword()
    • encrypt

      public static String encrypt(String inputString)
      Encrypts the inputString using the encryption password.
      Parameters:
      inputString - the string to encrypt
      Returns:
      the result of encryption
    • decrypt

      public static String decrypt(String encryptedString)
      Decrypts the inputString using the encryption password.
      Parameters:
      encryptedString - the string to decrypt
      Returns:
      the result of decryption
    • encrypt

      public static String encrypt(String inputString, String encryptionPassword)
      Encrypts the inputString using the encryption password.
      Parameters:
      inputString - the string to encrypt
      encryptionPassword - the password to be used for encryption
      Returns:
      the result of encryption
    • decrypt

      public static String decrypt(String encryptedString, String encryptionPassword)
      Decrypts the inputString using the encryption password.
      Parameters:
      encryptedString - the string to decrypt
      encryptionPassword - the password used for encryption
      Returns:
      the result of decryption
    • getDefaultEncryptor

      public static org.jasypt.encryption.StringEncryptor getDefaultEncryptor()
    • getStringEncryptor

      @NonNull public static org.jasypt.encryption.StringEncryptor getStringEncryptor(String encryptionPassword)
    • getByteEncryptor

      @NonNull public static org.jasypt.encryption.ByteEncryptor getByteEncryptor(String encryptionPassword)