Class 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
        }
    
     
    • Constructor Detail

      • ObjectDigestInfo

        public ObjectDigestInfo​(int digestedObjectType,
                                java.lang.String 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.
      • ObjectDigestInfo

        private ObjectDigestInfo​(ASN1Sequence seq)
    • Method Detail

      • getInstance

        public static ObjectDigestInfo getInstance​(java.lang.Object obj)
      • getDigestedObjectType

        public DEREnumerated getDigestedObjectType()
      • 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 class ASN1Encodable