Package org.gudy.bouncycastle.asn1.x509
Class ObjectDigestInfo
- java.lang.Object
-
- org.gudy.bouncycastle.asn1.ASN1Encodable
-
- org.gudy.bouncycastle.asn1.x509.ObjectDigestInfo
-
- All Implemented Interfaces:
DEREncodable
public class ObjectDigestInfo extends ASN1Encodable
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 (package private) AlgorithmIdentifier
digestAlgorithm
(package private) DEREnumerated
digestedObjectType
(package private) DERBitString
objectDigest
static int
otherObjectDigest
An other object is hashed.(package private) DERObjectIdentifier
otherObjectTypeID
static int
publicKey
The public key is hashed.static int
publicKeyCert
The public key certificate is hashed.-
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
-
Constructor Summary
Constructors Modifier Constructor Description ObjectDigestInfo(int digestedObjectType, java.lang.String otherObjectTypeID, AlgorithmIdentifier digestAlgorithm, byte[] objectDigest)
Constructor from given details.private
ObjectDigestInfo(ASN1Sequence seq)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmIdentifier
getDigestAlgorithm()
DEREnumerated
getDigestedObjectType()
static ObjectDigestInfo
getInstance(java.lang.Object obj)
static ObjectDigestInfo
getInstance(ASN1TaggedObject obj, boolean explicit)
DERBitString
getObjectDigest()
DERObjectIdentifier
getOtherObjectTypeID()
DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.-
Methods inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
-
-
-
Field Detail
-
publicKey
public static final int publicKey
The public key is hashed.- See Also:
- Constant Field Values
-
publicKeyCert
public static final int publicKeyCert
The public key certificate is hashed.- See Also:
- Constant Field Values
-
otherObjectDigest
public static final int otherObjectDigest
An other object is hashed.- See Also:
- Constant Field Values
-
digestedObjectType
DEREnumerated digestedObjectType
-
otherObjectTypeID
DERObjectIdentifier otherObjectTypeID
-
digestAlgorithm
AlgorithmIdentifier digestAlgorithm
-
objectDigest
DERBitString objectDigest
-
-
Constructor Detail
-
ObjectDigestInfo
public ObjectDigestInfo(int digestedObjectType, java.lang.String otherObjectTypeID, AlgorithmIdentifier digestAlgorithm, byte[] objectDigest)
Constructor from given details.If
digestedObjectType
is notpublicKeyCert
orpublicKey
otherObjectTypeID
must 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.
-
ObjectDigestInfo
private ObjectDigestInfo(ASN1Sequence seq)
-
-
Method Detail
-
getInstance
public static ObjectDigestInfo getInstance(java.lang.Object obj)
-
getInstance
public static ObjectDigestInfo getInstance(ASN1TaggedObject obj, boolean explicit)
-
getDigestedObjectType
public DEREnumerated getDigestedObjectType()
-
getOtherObjectTypeID
public DERObjectIdentifier getOtherObjectTypeID()
-
getDigestAlgorithm
public AlgorithmIdentifier getDigestAlgorithm()
-
getObjectDigest
public DERBitString getObjectDigest()
-
toASN1Object
public DERObject toASN1Object()
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:
toASN1Object
in classASN1Encodable
-
-