Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class ObjectDigestInfo

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1BitString, .ASN1EncodableVector, .ASN1Enumerated, .ASN1Object, .ASN1ObjectIdentifier, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERBitString, .DERSequence

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

Modifier and TypeField and Description
pack-priv AlgorithmIdentifier
pack-priv ASN1Enumerated
pack-priv ASN1BitString
public static final int
otherObjectDigest

An other object is hashed.

pack-priv ASN1ObjectIdentifier
public static final int
publicKey

The public key is hashed.

public static final int
publicKeyCert

The public key certificate is hashed.

Constructor Summary

AccessConstructor and Description
public
ObjectDigestInfo(int
The digest object type.
digestedObjectType
,
ASN1ObjectIdentifier
The object type ID for otherObjectDigest.
otherObjectTypeID
,
AlgorithmIdentifier
The algorithm identifier for the hash.
digestAlgorithm
,
byte[]
The hash value.
objectDigest
)

Constructor from given details.

private

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier
public ASN1Enumerated
public static ObjectDigestInfo
public static ObjectDigestInfo
getInstance(ASN1TaggedObject obj, boolean explicit)

public ASN1BitString
public ASN1ObjectIdentifier
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

digestAlgorithmback to summary
pack-priv AlgorithmIdentifier digestAlgorithm
digestedObjectTypeback to summary
pack-priv ASN1Enumerated digestedObjectType
objectDigestback to summary
pack-priv ASN1BitString objectDigest
otherObjectDigestback to summary
public static final int otherObjectDigest

An other object is hashed.

otherObjectTypeIDback to summary
pack-priv ASN1ObjectIdentifier otherObjectTypeID
publicKeyback to summary
public static final int publicKey

The public key is hashed.

publicKeyCertback to summary
public static final int publicKeyCert

The public key certificate is hashed.

Constructor Detail

ObjectDigestInfoback to summary
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:int

The digest object type.

otherObjectTypeID:ASN1ObjectIdentifier

The object type ID for otherObjectDigest.

digestAlgorithm:AlgorithmIdentifier

The algorithm identifier for the hash.

objectDigest:byte[]

The hash value.

ObjectDigestInfoback to summary
private ObjectDigestInfo(ASN1Sequence seq)

Method Detail

getDigestAlgorithmback to summary
public AlgorithmIdentifier getDigestAlgorithm()
getDigestedObjectTypeback to summary
public ASN1Enumerated getDigestedObjectType()
getInstanceback to summary
public static ObjectDigestInfo getInstance(Object obj)
getInstanceback to summary
public static ObjectDigestInfo getInstance(ASN1TaggedObject obj, boolean explicit)
getObjectDigestback to summary
public ASN1BitString getObjectDigest()
getOtherObjectTypeIDback to summary
public ASN1ObjectIdentifier getOtherObjectTypeID()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.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
   }

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.