Package com.portal.pcm
Class Crypt
java.lang.Object
com.portal.pcm.Crypt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInitializes the global variables for AES Encryption and MD5 Encryption.static StringdecryptData(String cipherData) Decrypts the cipher text data to the plain text.static Stringstatic String
-
Constructor Details
-
Crypt
public Crypt()
-
-
Method Details
-
cryptInit
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
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
-
decryptPassword
-