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
}
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(digestedObjectType);
if (otherObjectTypeID != null)
{
v.add(otherObjectTypeID);
}
v.add(digestAlgorithm);
v.add(objectDigest);
return new DERSequence(v);