Class PublicKeyKeyEncryptionMethodGenerator
java.lang.Object
org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
- Direct Known Subclasses:
BcPublicKeyKeyEncryptionMethodGenerator,JcePublicKeyKeyEncryptionMethodGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected booleanprotected booleanstatic final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) generate(int encAlgorithm, byte[] sessionInfo) generateV5(int encAlgorithm, int aeadAlgorithm, byte[] sessionInfo) 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) setSessionKeyObfuscation(boolean enabled) Controls whether to obfuscate the size of ECDH session keys using extra padding where necessary.setUseWildcardKeyID(boolean enabled) Controls whether the recipient key ID is hidden (replaced by a wildcard ID
-
Field Details
-
SESSION_KEY_OBFUSCATION_PROPERTY
- See Also:
-
WILDCARD
public static final long WILDCARD- See Also:
-
sessionKeyObfuscation
protected boolean sessionKeyObfuscation -
useWildcardKeyID
protected boolean useWildcardKeyID
-
-
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.
-
setUseWildcardKeyID
Controls whether the recipient key ID is hidden (replaced by a wildcard ID0
).- Parameters:
enabled- boolean- Returns:
- this
-
processSessionInfo
- Throws:
PGPException
-
generate
- Specified by:
generatein classPGPKeyEncryptionMethodGenerator- Throws:
PGPException
-
generateV5
public ContainedPacket generateV5(int encAlgorithm, int aeadAlgorithm, byte[] sessionInfo) throws PGPException - Specified by:
generateV5in classPGPKeyEncryptionMethodGenerator- Throws:
PGPException
-
generateV6
public ContainedPacket generateV6(int encAlgorithm, int aeadAlgorithm, byte[] sessionInfo) throws PGPException - Specified by:
generateV6in classPGPKeyEncryptionMethodGenerator- Throws:
PGPException
-
encryptSessionInfo
protected abstract byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException - Throws:
PGPException
-
getSessionInfo
- Throws:
IOException
-
getSessionInfo
protected static byte[] getSessionInfo(byte[] VB, int sysmmetricKeyAlgorithm, byte[] c)
-