org.mozilla.jss.pkcs7

Class DigestInfo

Implemented Interfaces:
ASN1Value

public class DigestInfo
extends java.lang.Object
implements ASN1Value

Nested Class Summary

static class
DigestInfo.Template
A class for decoding the BER encoding of a DigestInfo.

Constructor Summary

DigestInfo(AlgorithmIdentifier digestAlgorithm, OCTET_STRING digest)

Method Summary

void
encode(OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag.
void
encode(Tag implicitTag, OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag.
boolean
equals(Object obj)
OCTET_STRING
getDigest()
AlgorithmIdentifier
getDigestAlgorithm()
Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
static DigestInfo.Template
getTemplate()

Constructor Details

DigestInfo

public DigestInfo(AlgorithmIdentifier digestAlgorithm,
                  OCTET_STRING digest)

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using its own base tag.
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using an implicit tag.
Specified by:
encode in interface ASN1Value

equals

public boolean equals(Object obj)

getDigest

public OCTET_STRING getDigest()

getDigestAlgorithm

public AlgorithmIdentifier getDigestAlgorithm()

getTag

public Tag getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
Specified by:
getTag in interface ASN1Value

getTemplate

public static DigestInfo.Template getTemplate()