Skip to content

Commit 4e9b35a

Browse files
committed
Deprecate broken setPreferredAEADAlgorithms() / getPreferredAEADAlgorithms() methods
1 parent d88202f commit 4e9b35a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

pg/src/main/java/org/bouncycastle/openpgp/PGPSignatureSubpacketGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,15 @@ public void setPreferredCompressionAlgorithms(boolean isCritical, int[] algorith
193193
}
194194

195195
/**
196+
* This method is BROKEN!
196197
* Specify the preferred AEAD algorithms of this key.
197198
*
198199
* @param isCritical true if should be treated as critical, false otherwise.
199200
* @param algorithms array of algorithms in descending preference
201+
* @deprecated use {@link #setPreferredAEADCiphersuites(boolean, PreferredAEADCiphersuites.Combination[])}
202+
* or {@link #setPreferredLibrePgpEncryptionModes(boolean, int[])} instead.
200203
*/
204+
@Deprecated
201205
public void setPreferredAEADAlgorithms(boolean isCritical, int[] algorithms)
202206
{
203207
packets.add(new PreferredAlgorithms(SignatureSubpacketTags.PREFERRED_AEAD_ALGORITHMS, isCritical,

pg/src/main/java/org/bouncycastle/openpgp/PGPSignatureSubpacketVector.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,13 @@ public int[] getPreferredCompressionAlgorithms()
287287
return ((PreferredAlgorithms)p).getPreferences();
288288
}
289289

290+
/**
291+
* This method is BROKEN!
292+
* @deprecated use {@link #getPreferredAEADCiphersuites()} or {@link #getPreferredLibrePgpEncryptionModes()}
293+
* instead.
294+
* @return preferred AEAD Algorithms
295+
*/
296+
@Deprecated
290297
public int[] getPreferredAEADAlgorithms()
291298
{
292299
SignatureSubpacket p = this.getSubpacket(SignatureSubpacketTags.PREFERRED_AEAD_ALGORITHMS);

0 commit comments

Comments
 (0)