Bouncy Castle Cryptography Library 1.79

org.bouncycastle.bcpg.sig
Class PreferredAEADCiphersuites

java.lang.Object
  |
  +--org.bouncycastle.bcpg.SignatureSubpacket
        |
        +--org.bouncycastle.bcpg.sig.PreferredAlgorithms
              |
              +--org.bouncycastle.bcpg.sig.PreferredAEADCiphersuites

public class PreferredAEADCiphersuites
extends PreferredAlgorithms

Signature Subpacket containing the AEAD cipher suites (AEAD algorithm, Symmetric Key Algorithm pairs) preferred by the key holder's implementation.

See Also:
OpenPGP - Preferred AEAD Ciphersuites

Inner Class Summary
static class PreferredAEADCiphersuites.Builder
           
static class PreferredAEADCiphersuites.Combination
          Algorithm combination of a SymmetricKeyAlgorithmTags and a AEADAlgorithmTags.
 
Fields inherited from class org.bouncycastle.bcpg.SignatureSubpacket
data
 
Constructor Summary
PreferredAEADCiphersuites(boolean critical, boolean isLongLength, byte[] data)
          Create a new PreferredAEADAlgorithms signature subpacket from raw data.
PreferredAEADCiphersuites(boolean critical, PreferredAEADCiphersuites.Combination[] combinations)
          Create a new PreferredAEADAlgorithm signature subpacket.
 
Method Summary
static PreferredAEADCiphersuites.Builder builder(boolean isCritical)
          Return a PreferredAEADCiphersuites.Builder for constructing a PreferredAEADCiphersuites packet.
 PreferredAEADCiphersuites.Combination[] getAlgorithms()
          Returns AEAD algorithm preferences, including implicitly supported algorithm combinations.
 PreferredAEADCiphersuites.Combination[] getRawAlgorithms()
          Return AEAD algorithm preferences.
 boolean isSupported(PreferredAEADCiphersuites.Combination combination)
          Return true, if the given algorithm combination is supported (explicitly or implicitly).
 
Methods inherited from class org.bouncycastle.bcpg.sig.PreferredAlgorithms
getPreferences, intToByteArray
 
Methods inherited from class org.bouncycastle.bcpg.SignatureSubpacket
encode, equals, getData, getType, hashCode, isCritical, isLongLength
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferredAEADCiphersuites

public PreferredAEADCiphersuites(boolean critical,
                                 boolean isLongLength,
                                 byte[] data)
Create a new PreferredAEADAlgorithms signature subpacket from raw data.
Parameters:
critical - whether the subpacket is critical
isLongLength - whether the subpacket uses long length encoding
data - raw data

PreferredAEADCiphersuites

public PreferredAEADCiphersuites(boolean critical,
                                 PreferredAEADCiphersuites.Combination[] combinations)
Create a new PreferredAEADAlgorithm signature subpacket.
Parameters:
critical - whether the subpacket is critical
combinations - list of combinations, with the most preferred option first
Method Detail

isSupported

public boolean isSupported(PreferredAEADCiphersuites.Combination combination)
Return true, if the given algorithm combination is supported (explicitly or implicitly).
Parameters:
combination - combination
Returns:
true, if the combination is supported, false otherwise

getRawAlgorithms

public PreferredAEADCiphersuites.Combination[] getRawAlgorithms()
Return AEAD algorithm preferences. The most preferred option comes first. This method returns the combinations as they are listed in the packet, possibly excluding implicitly supported combinations.
Returns:
explicitly supported algorithm combinations

getAlgorithms

public PreferredAEADCiphersuites.Combination[] getAlgorithms()
Returns AEAD algorithm preferences, including implicitly supported algorithm combinations.
Returns:
all supported algorithm combinations

builder

public static PreferredAEADCiphersuites.Builder builder(boolean isCritical)
Return a PreferredAEADCiphersuites.Builder for constructing a PreferredAEADCiphersuites packet.
Parameters:
isCritical - true if the packet is considered critical.
Returns:
builder

Bouncy Castle Cryptography Library 1.79