Class PublicKeyKeyEncryptionMethodGenerator
java.lang.Object
org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
- Direct Known Subclasses:
BcPublicKeyKeyEncryptionMethodGenerator
,JcePublicKeyKeyEncryptionMethodGenerator
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]
encryptSessionInfo
(PGPPublicKey pubKey, byte[] sessionInfo) generate
(int encAlgorithm, byte[] sessionInfo) Generates a packet encoding the details of this encryption method.byte[][]
processSessionInfo
(byte[] encryptedSessionInfo) setSessionKeyObfuscation
(boolean enabled) Controls whether to obfuscate the size of ECDH session keys using extra padding where necessary.
-
Field Details
-
SESSION_KEY_OBFUSCATION_PROPERTY
- See Also:
-
sessionKeyObfuscation
protected boolean sessionKeyObfuscation
-
-
Constructor Details
-
PublicKeyKeyEncryptionMethodGenerator
-
-
Method Details
-
setSessionKeyObfuscation
Controls whether to obfuscate the size of ECDH session keys using extra padding where necessary.The default behaviour can be configured using the system property "", or else it will default to enabled.
- Returns:
- the current generator.
-
processSessionInfo
- Throws:
PGPException
-
generate
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
-