public abstract class PublicKeyKeyEncryptionMethodGenerator extends PGPKeyEncryptionMethodGenerator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SESSION_KEY_OBFUSCATION_PROPERTY |
protected boolean |
sessionKeyObfuscation |
| Modifier | Constructor and Description |
|---|---|
protected |
PublicKeyKeyEncryptionMethodGenerator(PGPPublicKey pubKey) |
| Modifier and Type | Method and 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) |
PublicKeyKeyEncryptionMethodGenerator |
setSessionKeyObfuscation(boolean enabled)
Controls whether to obfuscate the size of ECDH session keys using extra padding where necessary.
|
public static final java.lang.String SESSION_KEY_OBFUSCATION_PROPERTY
protected boolean sessionKeyObfuscation
protected PublicKeyKeyEncryptionMethodGenerator(PGPPublicKey pubKey)
public PublicKeyKeyEncryptionMethodGenerator setSessionKeyObfuscation(boolean enabled)
The default behaviour can be configured using the system property "", or else it will default to enabled.
public byte[][] processSessionInfo(byte[] encryptedSessionInfo)
throws PGPException
PGPExceptionpublic ContainedPacket generate(int encAlgorithm, byte[] sessionInfo) throws PGPException
PGPKeyEncryptionMethodGeneratorgenerate in class PGPKeyEncryptionMethodGeneratorencAlgorithm - the encryption algorithm being usedsessionInfo - session data generated by the encrypted data generator.PGPException - if an error occurs constructing the packet.protected abstract byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException
PGPException