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.
Add LibrePGPPreferredEncryptionModes signature subpacket
- Loading branch information
1 parent
92e1624
commit 13847c1
Showing
2 changed files
with
24 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
pg/src/main/java/org/bouncycastle/bcpg/sig/LibrePGPPreferredEncryptionModes.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.bouncycastle.bcpg.sig; | ||
|
||
import org.bouncycastle.bcpg.SignatureSubpacketTags; | ||
|
||
/** | ||
* This is a deprecated LibrePGP signature subpacket with encryption mode numbers to indicate which modes | ||
* the key holder prefers to use with OCB Encrypted Data Packets ({@link org.bouncycastle.bcpg.AEADEncDataPacket}). | ||
* Implementations SHOULD ignore this subpacket and assume {@link org.bouncycastle.bcpg.AEADAlgorithmTags#OCB}. | ||
*/ | ||
public class LibrePGPPreferredEncryptionModes | ||
extends PreferredAlgorithms | ||
{ | ||
|
||
public LibrePGPPreferredEncryptionModes(boolean isCritical, int[] encryptionModes) | ||
{ | ||
this(isCritical, false, intToByteArray(encryptionModes)); | ||
} | ||
|
||
protected LibrePGPPreferredEncryptionModes(boolean critical, boolean isLongLength, byte[] data) | ||
{ | ||
super(SignatureSubpacketTags.LIBREPGP_PREFERRED_ENCRYPTION_MODES, critical, isLongLength, data); | ||
} | ||
} |