Class OidCatalogue
java.lang.Object
org.bouncycastle.operator.OidCatalogue
Catalogue of content-encryption algorithm OIDs used where code only needs to
identify the parameter form or block size family for an algorithm.
The methods in this class are membership tests only. They do not provide key sizes, JCA names, or provider registration aliases.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAEAD(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies an AEAD content-encryption algorithm whose parameters are encoded as GCMParameters or CCMParameters (i.e. a GCM or CCM algorithm).static booleanisAuthEnveloped(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a content-encryption algorithm that provides authenticated encryption and so can be used with CMS AuthEnvelopedData (RFC 5083): the GCM and CCM families plus ChaCha20-Poly1305.static booleanisCBC128(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 128-bit block size and an IV encoded as an octet string.static booleanisCBC64(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 64-bit block size (DES, triple-DES, RC2, CAST5, IDEA).static booleanisCCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CCM content-encryption algorithm whose parameters are encoded as CCMParameters.static booleanisChaCha20Poly1305(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies the ChaCha20-Poly1305 AEAD content-encryption algorithm.static booleanisGCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a GCM content-encryption algorithm whose parameters are encoded as GCMParameters.
-
Method Details
-
isCCM
public static boolean isCCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CCM content-encryption algorithm whose parameters are encoded as CCMParameters.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known CCM content-encryption algorithm.
-
isGCM
public static boolean isGCM(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a GCM content-encryption algorithm whose parameters are encoded as GCMParameters.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known GCM content-encryption algorithm.
-
isCBC128
public static boolean isCBC128(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 128-bit block size and an IV encoded as an octet string.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known 128-bit block CBC content-encryption algorithm.
-
isCBC64
public static boolean isCBC64(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a CBC content-encryption algorithm with a 64-bit block size (DES, triple-DES, RC2, CAST5, IDEA).This is a block-size predicate only: unlike the GCM/CCM/CBC-128 families, the members do not share a single parameter encoding (RC2 carries RC2CBCParameter, CAST5 carries CAST5CBCParameters, the rest an octet-string IV), so this test is for code that classifies by block size (e.g. PKCS#7 padded output length) rather than by parameter form.
- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known 64-bit block CBC content-encryption algorithm.
-
isChaCha20Poly1305
public static boolean isChaCha20Poly1305(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies the ChaCha20-Poly1305 AEAD content-encryption algorithm.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is ChaCha20-Poly1305.
-
isAEAD
public static boolean isAEAD(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies an AEAD content-encryption algorithm whose parameters are encoded as GCMParameters or CCMParameters (i.e. a GCM or CCM algorithm). ChaCha20-Poly1305, whose parameters differ, is not included here; useisAuthEnveloped(ASN1ObjectIdentifier)for the full set of algorithms usable with CMS AuthEnvelopedData.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known GCM or CCM content-encryption algorithm.
-
isAuthEnveloped
public static boolean isAuthEnveloped(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm) Return whether the OID identifies a content-encryption algorithm that provides authenticated encryption and so can be used with CMS AuthEnvelopedData (RFC 5083): the GCM and CCM families plus ChaCha20-Poly1305.- Parameters:
algorithm- candidate algorithm OID.- Returns:
- true if the OID is a known AEAD content-encryption algorithm.
-