Default1Cipher instead.@Deprecated public class DefaultAESCBCCipher extends java.lang.Object implements ICipher
| Constructor and Description |
|---|
DefaultAESCBCCipher(byte[] encryptionKey,
java.lang.String charset)
Deprecated.
A default AES (CBC Mode) Cipher.
|
DefaultAESCBCCipher(java.lang.String base64CodedEncryptionKey)
Deprecated.
This constructor assumes data to be of type 'UTF-8'
A default AES (CBC Mode) Cipher.
|
DefaultAESCBCCipher(java.lang.String base64CodedEncryptionKey,
java.lang.String charset)
Deprecated.
A default AES (CBC Mode) Cipher.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decrypt(java.lang.String cipherText)
Deprecated.
A method to decrypt the provided cipher text.
|
java.lang.String |
encrypt(java.lang.String plainText)
Deprecated.
This method is used to encrypt(Symmetric) plainText coming in input using AES algorithm
|
public DefaultAESCBCCipher(java.lang.String base64CodedEncryptionKey)
throws java.security.GeneralSecurityException
ICipher that accepts a char[] or byte[] as key and you take care of filling
up that array with garbage when done.
This constructor does not check if the given bytes indeed specify a secret key of the specified algorithm.
For example, this constructor does not check if key is 128, 192, 256 bytes long, and also does not check for weak or semi-weak keys.
Note: If you want to use Key > 128 bits then you need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction
Policy files.base64CodedEncryptionKey - A base 64 encoded symmetric key to be used during encryption and decryption.java.security.GeneralSecurityException - a general security exceptionpublic DefaultAESCBCCipher(java.lang.String base64CodedEncryptionKey,
java.lang.String charset)
throws java.security.GeneralSecurityException
ICipher that accepts a char[] or byte[] as key and you take care of filling
up that array with garbage when done.
This constructor does not check if the given bytes indeed specify a secret key of the specified algorithm.
For example, this constructor does not check if key is 128, 192, 256 bytes long, and also does not check for weak or semi-weak keys.
Note: If you want to use Key > 128 bits then you need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction
Policy files.base64CodedEncryptionKey - A base 64 encoded symmetric key to be used during encryption and decryption.charset - charset to be considered when encrypting plaintext, or decrypting cipher textjava.security.GeneralSecurityException - a general security exceptionpublic DefaultAESCBCCipher(byte[] encryptionKey,
java.lang.String charset)
throws java.security.GeneralSecurityException
encryptionKey - symmetric key to be used during encryption or decryption.charset - charset to be considered when encrypting plaintext, or decrypting cipher textjava.security.GeneralSecurityException - a general security exception