Class PublicKeyKeyEncryptionMethodGenerator
- java.lang.Object
-
- org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
-
- org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
-
- Direct Known Subclasses:
BcPublicKeyKeyEncryptionMethodGenerator
,JcePublicKeyKeyEncryptionMethodGenerator
public abstract class PublicKeyKeyEncryptionMethodGenerator extends PGPKeyEncryptionMethodGenerator
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PublicKeyKeyEncryptionMethodGenerator(PGPPublicKey pubKey)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract byte[]
encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo)
ContainedPacket
generate(int encAlgorithm, byte[] sessionInfo)
Generates a packet encoding the details of this encryption method.byte[][]
processSessionInfo(byte[] encryptedSessionInfo)
-
-
-
Constructor Detail
-
PublicKeyKeyEncryptionMethodGenerator
protected PublicKeyKeyEncryptionMethodGenerator(PGPPublicKey pubKey)
-
-
Method Detail
-
processSessionInfo
public byte[][] processSessionInfo(byte[] encryptedSessionInfo) throws PGPException
- Throws:
PGPException
-
generate
public ContainedPacket generate(int encAlgorithm, byte[] sessionInfo) throws PGPException
Description copied from class:PGPKeyEncryptionMethodGenerator
Generates a packet encoding the details of this encryption method.- Specified by:
generate
in classPGPKeyEncryptionMethodGenerator
- Parameters:
encAlgorithm
- theencryption algorithm
being usedsessionInfo
- session data generated by the encrypted data generator.- Returns:
- a packet encoding the provided information and the configuration of this instance.
- Throws:
PGPException
- if an error occurs constructing the packet.
-
encryptSessionInfo
protected abstract byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException
- Throws:
PGPException
-
-