Package org.bouncycastle.asn1.x509
Class ObjectDigestInfo
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.ObjectDigestInfo
- All Implemented Interfaces:
ASN1Encodable
public class ObjectDigestInfo extends ASN1Object
ObjectDigestInfo ASN.1 structure used in v2 attribute certificates.
ObjectDigestInfo ::= SEQUENCE {
digestedObjectType ENUMERATED {
publicKey (0),
publicKeyCert (1),
otherObjectTypes (2) },
-- otherObjectTypes MUST NOT
-- be used in this profile
otherObjectTypeID OBJECT IDENTIFIER OPTIONAL,
digestAlgorithm AlgorithmIdentifier,
objectDigest BIT STRING
}
-
Field Summary
Fields Modifier and Type Field Description static intotherObjectDigestAn other object is hashed.static intpublicKeyThe public key is hashed.static intpublicKeyCertThe public key certificate is hashed. -
Constructor Summary
Constructors Constructor Description ObjectDigestInfo(int digestedObjectType, ASN1ObjectIdentifier otherObjectTypeID, AlgorithmIdentifier digestAlgorithm, byte[] objectDigest)Constructor from given details. -
Method Summary
Modifier and Type Method Description AlgorithmIdentifiergetDigestAlgorithm()ASN1EnumeratedgetDigestedObjectType()static ObjectDigestInfogetInstance(Object obj)static ObjectDigestInfogetInstance(ASN1TaggedObject obj, boolean explicit)DERBitStringgetObjectDigest()ASN1ObjectIdentifiergetOtherObjectTypeID()ASN1PrimitivetoASN1Primitive()Produce an object suitable for an ASN1OutputStream.Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
Field Details
-
publicKey
public static final int publicKeyThe public key is hashed.- See Also:
- Constant Field Values
-
publicKeyCert
public static final int publicKeyCertThe public key certificate is hashed.- See Also:
- Constant Field Values
-
otherObjectDigest
public static final int otherObjectDigestAn other object is hashed.- See Also:
- Constant Field Values
-
-
Constructor Details
-
ObjectDigestInfo
public ObjectDigestInfo(int digestedObjectType, ASN1ObjectIdentifier otherObjectTypeID, AlgorithmIdentifier digestAlgorithm, byte[] objectDigest)Constructor from given details.If
digestedObjectTypeis notpublicKeyCertorpublicKeyotherObjectTypeIDmust be given, otherwise it is ignored.- Parameters:
digestedObjectType- The digest object type.otherObjectTypeID- The object type ID forotherObjectDigest.digestAlgorithm- The algorithm identifier for the hash.objectDigest- The hash value.
-
-
Method Details
-
getInstance
-
getInstance
-
getDigestedObjectType
-
getOtherObjectTypeID
-
getDigestAlgorithm
-
getObjectDigest
-
toASN1Primitive
Produce an object suitable for an ASN1OutputStream.ObjectDigestInfo ::= SEQUENCE { digestedObjectType ENUMERATED { publicKey (0), publicKeyCert (1), otherObjectTypes (2) }, -- otherObjectTypes MUST NOT -- be used in this profile otherObjectTypeID OBJECT IDENTIFIER OPTIONAL, digestAlgorithm AlgorithmIdentifier, objectDigest BIT STRING }- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object
-