public class Default1Cipher extends java.lang.Object implements ICipher
| Constructor and Description |
|---|
Default1Cipher(byte[] encryptionKey)
Creates a new default cipher using 'UTF-8' encoding and key.
|
Default1Cipher(byte[] encryptionKey,
java.nio.charset.Charset charset)
Creates a new default cipher with the specified charset encoding and key.
|
Default1Cipher(java.lang.String base64CodedEncryptionKey)
Creates a new default cipher using 'UTF-8' encoding, with a base64-encoded key.
|
Default1Cipher(java.lang.String base64CodedEncryptionKey,
java.nio.charset.Charset charset)
Creates a new default cipher with the specified charset encoding, with a base64-encoded key.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decrypt(java.lang.String cipherText)
A method to decrypt the provided cipher text.
|
java.lang.String |
encrypt(java.lang.String plainText)
This method is used to encrypt(Symmetric) plainText coming in input using AES algorithm
|
public Default1Cipher(java.lang.String base64CodedEncryptionKey)
throws java.security.GeneralSecurityException
base64CodedEncryptionKey - A base 64 encoded symmetric key to be used during encryption and decryption.java.security.GeneralSecurityException - a general security exceptionpublic Default1Cipher(byte[] encryptionKey)
throws java.security.GeneralSecurityException
encryptionKey - A symmetric key to be used during encryption and decryption.java.security.GeneralSecurityException - a general security exceptionpublic Default1Cipher(java.lang.String base64CodedEncryptionKey,
java.nio.charset.Charset charset)
throws java.security.GeneralSecurityException
base64CodedEncryptionKey - A base 64 encoded symmetric key to be used during encryption and decryption.charset - The charset to be considered when encrypting plaintext or decrypting ciphertext.java.security.GeneralSecurityException - a general security exceptionpublic Default1Cipher(byte[] encryptionKey,
java.nio.charset.Charset charset)
throws java.security.GeneralSecurityException
encryptionKey - A symmetric key to be used during encryption and decryption.charset - The charset to be considered when encrypting plaintext or decrypting ciphertext.java.security.GeneralSecurityException - a general security exception