Class AbstractEncryptionHandler
java.lang.Object
org.forgerock.json.jose.jwe.handlers.encryption.AbstractEncryptionHandler
- All Implemented Interfaces:
EncryptionHandler
- Direct Known Subclasses:
RSA15AES128CBCHS256EncryptionHandler
,RSA15AES256CBCHS512EncryptionHandler
@Deprecated
public abstract class AbstractEncryptionHandler
extends Object
implements EncryptionHandler
Deprecated.
A base implementation of an EncryptionHandler that provides common encryption and decryption methods for all
concrete EncryptionHandler implementations.
- Since:
- 2.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Deprecated.Decrypts the given ciphertext using the private key and with the same encryption algorithm that was used in the encryption.protected byte[]
Deprecated.Decrypts the given ciphertext using the private key and initialisation vector with the same encryption algorithm that was used in the encryption.protected byte[]
Deprecated.Encrypts the given plaintext using the specified key with the specified encryption algorithm.protected byte[]
Deprecated.Encrypts the given plaintext using the specified key and initialisation vector with the specified encryption algorithm.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.forgerock.json.jose.jwe.handlers.encryption.EncryptionHandler
decryptCiphertext, decryptContentEncryptionKey, decryptContentEncryptionKey, encryptPlaintext, generateInitialisationVector, generateJWEEncryptedKey, generateJWEEncryptedKey, getContentEncryptionKey
-
Constructor Details
-
AbstractEncryptionHandler
public AbstractEncryptionHandler()Deprecated.
-
-
Method Details
-
encrypt
Deprecated.Encrypts the given plaintext using the specified key with the specified encryption algorithm.- Parameters:
algorithm
- The Java Cryptographic encryption algorithm.key
- The encryption key.data
- The data to encrypt.- Returns:
- An array of bytes representing the encrypted data.
-
encrypt
Deprecated.Encrypts the given plaintext using the specified key and initialisation vector with the specified encryption algorithm.- Parameters:
algorithm
- The Java Cryptographic encryption algorithm.key
- The encryption key.initialisationVector
- The initialisation vector.data
- The data to encrypt.- Returns:
- An array of bytes representing the encrypted data.
-
decrypt
Deprecated.Decrypts the given ciphertext using the private key and with the same encryption algorithm that was used in the encryption.- Parameters:
algorithm
- The Java Cryptographic encryption algorithm.privateKey
- The private key pair to the public key used in the encryption.data
- The ciphertext to decrypt.- Returns:
- An array of bytes representing the decrypted data.
-
decrypt
Deprecated.Decrypts the given ciphertext using the private key and initialisation vector with the same encryption algorithm that was used in the encryption.- Parameters:
algorithm
- The Java Cryptographic encryption algorithm.key
- The private key pair to the public key used in the encryption.initialisationVector
- The same initialisation vector that was used in the encryption.data
- The ciphertext to decrypt.- Returns:
- An array of bytes representing the decrypted data.
-
ContentEncryptionHandler
instead.