org.bouncycastle.asn1.x509
Class ObjectDigestInfo
java.lang.Object
|
+--org.bouncycastle.asn1.ASN1Object
|
+--org.bouncycastle.asn1.x509.ObjectDigestInfo
- All Implemented Interfaces:
- ASN1Encodable, Encodable
- 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
}
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
publicKey
public static final int publicKey
- The public key is hashed.
publicKeyCert
public static final int publicKeyCert
- The public key certificate is hashed.
otherObjectDigest
public static final int otherObjectDigest
- An other object is hashed.
ObjectDigestInfo
public ObjectDigestInfo(int digestedObjectType,
ASN1ObjectIdentifier otherObjectTypeID,
AlgorithmIdentifier digestAlgorithm,
byte[] objectDigest)
- Constructor from given details.
If digestedObjectType is not publicKeyCert
or
publicKey
otherObjectTypeID must be given,
otherwise it is ignored.
- Parameters:
digestedObjectType
- The digest object type.otherObjectTypeID
- The object type ID for
otherObjectDigest.digestAlgorithm
- The algorithm identifier for the hash.objectDigest
- The hash value.
getInstance
public static ObjectDigestInfo getInstance(java.lang.Object obj)
getInstance
public static ObjectDigestInfo getInstance(ASN1TaggedObject obj,
boolean explicit)
getDigestedObjectType
public ASN1Enumerated getDigestedObjectType()
getOtherObjectTypeID
public ASN1ObjectIdentifier getOtherObjectTypeID()
getDigestAlgorithm
public AlgorithmIdentifier getDigestAlgorithm()
getObjectDigest
public ASN1BitString getObjectDigest()
toASN1Primitive
public ASN1Primitive 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
}
- Overrides:
toASN1Primitive
in class ASN1Object
- Following copied from class:
org.bouncycastle.asn1.ASN1Object
- Returns:
- a primitive representation of this object.