public abstract class PublicKeyKeyEncryptionMethodGenerator extends PGPKeyEncryptionMethodGenerator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SESSION_KEY_OBFUSCATION_PROPERTY |
protected boolean |
sessionKeyObfuscation |
protected boolean |
useWildcardKeyID |
static long |
WILDCARD |
| 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.
|
ContainedPacket |
generateV5(int encAlgorithm,
int aeadAlgorithm,
byte[] sessionInfo) |
ContainedPacket |
generateV6(int encAlgorithm,
int aeadAlgorithm,
byte[] sessionInfo) |
protected static byte[] |
getSessionInfo(byte[] ephPubEncoding,
byte[] c) |
protected static byte[] |
getSessionInfo(byte[] VB,
int sysmmetricKeyAlgorithm,
byte[] c) |
byte[][] |
processSessionInfo(byte[] encryptedSessionInfo) |
PublicKeyKeyEncryptionMethodGenerator |
setSessionKeyObfuscation(boolean enabled)
Controls whether to obfuscate the size of ECDH session keys using extra padding where necessary.
|
PublicKeyKeyEncryptionMethodGenerator |
setUseWildcardKeyID(boolean enabled)
Controls whether the recipient key ID is hidden (replaced by a wildcard ID
|
public static final java.lang.String SESSION_KEY_OBFUSCATION_PROPERTY
public static final long WILDCARD
protected boolean sessionKeyObfuscation
protected boolean useWildcardKeyID
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 PublicKeyKeyEncryptionMethodGenerator setUseWildcardKeyID(boolean enabled)
0).
enabled - booleanpublic 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.public ContainedPacket generateV5(int encAlgorithm, int aeadAlgorithm, byte[] sessionInfo) throws PGPException
generateV5 in class PGPKeyEncryptionMethodGeneratorPGPExceptionpublic ContainedPacket generateV6(int encAlgorithm, int aeadAlgorithm, byte[] sessionInfo) throws PGPException
generateV6 in class PGPKeyEncryptionMethodGeneratorPGPExceptionprotected abstract byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException
PGPExceptionprotected static byte[] getSessionInfo(byte[] ephPubEncoding,
byte[] c)
throws java.io.IOException
java.io.IOExceptionprotected static byte[] getSessionInfo(byte[] VB,
int sysmmetricKeyAlgorithm,
byte[] c)