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.UseContentEncryptionHandler
instead.A base implementation of an EncryptionHandler that provides common encryption and decryption methods for all concrete EncryptionHandler implementations.- Since:
- 2.0.0
-
-
Constructor Summary
Constructors Constructor Description AbstractEncryptionHandler()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte[]
decrypt(String algorithm, Key privateKey, byte[] data)
Deprecated.Decrypts the given ciphertext using the private key and with the same encryption algorithm that was used in the encryption.protected byte[]
decrypt(String algorithm, Key key, byte[] initialisationVector, byte[] data)
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[]
encrypt(String algorithm, Key key, byte[] data)
Deprecated.Encrypts the given plaintext using the specified key with the specified encryption algorithm.protected byte[]
encrypt(String algorithm, Key key, byte[] initialisationVector, byte[] data)
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
-
-
-
-
Method Detail
-
encrypt
protected byte[] encrypt(String algorithm, Key key, byte[] data)
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
protected byte[] encrypt(String algorithm, Key key, byte[] initialisationVector, byte[] data)
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
public byte[] decrypt(String algorithm, Key privateKey, byte[] data)
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
protected byte[] decrypt(String algorithm, Key key, byte[] initialisationVector, byte[] data)
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.
-
-