Class Crypt

java.lang.Object
com.portal.pcm.Crypt

public class Crypt extends Object
  • Constructor Details

    • Crypt

      public Crypt()
  • Method Details

    • cryptInit

      public static void cryptInit(String keysStr, String md5Key)
      Initializes the global variables for AES Encryption and MD5 Encryption. Sets aesCryptInitialized to 1 if AES Encryption is initialized. Sets md5CryptInitialized to 1 if MD5 Encryption is initialized.
      Parameters:
      keysStr - - Array of AES keys for initialization of AES Encryption.
      md5Key - - MD5 key for initialization of MD5 Encryption.
    • decryptData

      public static String decryptData(String cipherData)
      Decrypts the cipher text data to the plain text. If the data is AES encrypted, data will be decrypted only when aesCryptInitialized is set to 1 and MD5 encrypted data will be decrypted only when md5CryptInitialized is set to 1.
      Parameters:
      cipherData - - Encrypted data.
      Returns:
      String - Decrypted plain text data.
    • encryptPassword

      public static String encryptPassword(String b)
    • decryptPassword

      public static String decryptPassword(String b)