Class EncryptionUtil

java.lang.Object
org.conical.common.bbl.auth.EncryptionUtil

public class EncryptionUtil extends Object
Encryption utility class provides methods related to string and plain-text encryption. This class uses the java.security.MessageDigest class and thus supports only a subset of the algorithms supported by that class.
Author:
rdoherty
  • Constructor Details

    • EncryptionUtil

      public EncryptionUtil()
  • Method Details

    • encrypt

      public static String encrypt(String plaintext, EncryptionUtil.Algorithm algorithm)
      Encrypts the given plain text using the passed algorithm. The result is then encoded as a Base-64 string and returned.
      Parameters:
      plaintext - text to encrypt
      algorithm - algorithm to use
      Returns:
      Base-64 encoded result of the encryption algorithm