Class C509AlgorithmIdentifier
java.lang.Object
org.bouncycastle.cbor.c509.C509AlgorithmIdentifier
A C509 AlgorithmIdentifier, either a registered CBOR int or an unwrapped CBOR OID
(RFC 9090) optionally followed by the DER-encoded parameters as a CBOR byte string
(Sections 3.1.3 and 3.1.7 of draft-ietf-cose-cbor-encoded-cert-20):
AlgorithmIdentifier = int / ~oid / [ algorithm: ~oid, parameters: bytes ]The meaning of a registered int depends on which registry the field draws from (signature algorithms, Section 8.14, or public key algorithms, Section 8.15), so instances are created through the registry-specific factory methods, and every instance carries its resolved X.509
AlgorithmIdentifier.-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic C509AlgorithmIdentifierforPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm) Build the C509 form of a subject public key AlgorithmIdentifier, using the registered int where the C509 Public Key Algorithms Registry (Section 8.15) has an entry for it, and the unwrapped CBOR OID form otherwise.static C509AlgorithmIdentifierforSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm) Build the C509 form of a signature AlgorithmIdentifier, using the registered int where the C509 Signature Algorithms Registry (Section 8.14) has an entry for it, and the unwrapped CBOR OID form otherwise.Return the registry value for the algorithm this identifier resolves to, whether it is carried as an int or as an OID whose AlgorithmIdentifier matches a registry entry, or null when the algorithm is not registered.inthashCode()booleanReturn true if this identifier is carried as a registered CBOR int on the wire.org.bouncycastle.asn1.x509.AlgorithmIdentifierReturn the X.509 AlgorithmIdentifier this identifier stands for.
-
Method Details
-
forSignatureAlgorithm
public static C509AlgorithmIdentifier forSignatureAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm) Build the C509 form of a signature AlgorithmIdentifier, using the registered int where the C509 Signature Algorithms Registry (Section 8.14) has an entry for it, and the unwrapped CBOR OID form otherwise. -
forPublicKeyAlgorithm
public static C509AlgorithmIdentifier forPublicKeyAlgorithm(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithm) Build the C509 form of a subject public key AlgorithmIdentifier, using the registered int where the C509 Public Key Algorithms Registry (Section 8.15) has an entry for it, and the unwrapped CBOR OID form otherwise. -
isRegisteredValue
public boolean isRegisteredValue()Return true if this identifier is carried as a registered CBOR int on the wire. -
getRegistryValue
Return the registry value for the algorithm this identifier resolves to, whether it is carried as an int or as an OID whose AlgorithmIdentifier matches a registry entry, or null when the algorithm is not registered. -
toX509AlgorithmIdentifier
public org.bouncycastle.asn1.x509.AlgorithmIdentifier toX509AlgorithmIdentifier()Return the X.509 AlgorithmIdentifier this identifier stands for. -
equals
-
hashCode
-