Interface PublicKeyDataDecryptorFactory
-
- All Superinterfaces:
PGPDataDecryptorFactory
- All Known Implementing Classes:
AbstractPublicKeyDataDecryptorFactory,BcPublicKeyDataDecryptorFactory
public interface PublicKeyDataDecryptorFactory extends PGPDataDecryptorFactory
Factory for public-key basedPGPDataDecryptors. The purpose of this class is to act as an abstract factory, whose subclasses can decide, which concrete implementation to use to decrypt OpenPGP messages that were encrypted to a public-key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description byte[]recoverSessionData(int keyAlgorithm, byte[][] secKeyData)Deprecated.byte[]recoverSessionData(int keyAlgorithm, byte[][] secKeyData, int pkeskVersion)Deprecated.byte[]recoverSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData)Recover the plain session info by decrypting the encrypted session key.-
Methods inherited from interface org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory
createDataDecryptor, createDataDecryptor, createDataDecryptor
-
-
-
-
Method Detail
-
recoverSessionData
byte[] recoverSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData) throws PGPException
Recover the plain session info by decrypting the encrypted session key. The session info ALWAYS has the symmetric algorithm ID prefixed, so the return value is:[sym-alg][session-key][checksum]?
- Parameters:
pkesk- public-key encrypted session-key packetencData- encrypted data (sed/seipd/oed) packet- Returns:
- decrypted session info
- Throws:
PGPException
-
recoverSessionData
byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData) throws PGPExceptionDeprecated.Recover the plain session info by decrypting the encrypted session key. This method returns the decrypted session info as-is (without prefixing missing cipher algorithm), so the return value is:[sym-alg]?[session-key][checksum]?
- Parameters:
keyAlgorithm- public key algorithmsecKeyData- encrypted session key data- Returns:
- decrypted session info
- Throws:
PGPException
-
recoverSessionData
byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData, int pkeskVersion) throws PGPExceptionDeprecated.Recover the plain session info by decrypting the encrypted session key. This method returns the decrypted session info as-is (without prefixing missing cipher algorithm), so the return value is:[sym-alg]?[session-key][checksum]?
- Parameters:
keyAlgorithm- public key algorithmsecKeyData- encrypted session key datapkeskVersion- version of the PKESK packet- Returns:
- decrypted session info
- Throws:
PGPException
-
-