forked from bcgit/bc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84536cb
commit 592aeaa
Showing
3 changed files
with
143 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
pg/src/main/java/org/bouncycastle/openpgp/operator/PublicKeyDataDecryptorFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
package org.bouncycastle.openpgp.operator; | ||
|
||
import org.bouncycastle.bcpg.InputStreamPacket; | ||
import org.bouncycastle.bcpg.PublicKeyEncSessionPacket; | ||
import org.bouncycastle.openpgp.PGPException; | ||
|
||
public interface PublicKeyDataDecryptorFactory | ||
extends PGPDataDecryptorFactory | ||
{ | ||
/** | ||
* Recover the session key. | ||
* The return value is a two-dimensional byte array containing the following information about the session key: | ||
* <ul> | ||
* <li>session-key</li> | ||
* <li>1 or 0 bytes encoding the optionally included symmetric key algorithm</li> | ||
* <li>0 or 2 checksum bytes</li> | ||
* </ul> | ||
* @param pkesk public key encrypted session-key packet | ||
* @param encryptedData SEIPD, SED or OED packet | ||
* @return 2-dimensional byte array. | ||
* @throws PGPException | ||
*/ | ||
byte[][] recoverSessionKey(PublicKeyEncSessionPacket pkesk, InputStreamPacket encryptedData) | ||
throws PGPException; | ||
|
||
/** | ||
* @deprecated use {@link #recoverSessionKey(PublicKeyEncSessionPacket, InputStreamPacket)} instead. | ||
* @param keyAlgorithm public key algorithm | ||
* @param secKeyData encrypted session key data | ||
* @param pkeskVersion version of the PKESK packet | ||
* @return | ||
* @throws PGPException | ||
*/ | ||
byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData, int pkeskVersion) | ||
throws PGPException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters