DigestInfo::=SEQUENCE{ digestAlgorithm AlgorithmIdentifier, digest OCTET STRING }
this.digest = digest; this.algId = algId;
Enumeration e = obj.getObjects(); algId = AlgorithmIdentifier.getInstance(e.nextElement()); digest = ASN1OctetString.getInstance(e.nextElement()).getOctets();
return algId;
return digest;
return getInstance(ASN1Sequence.getInstance(obj, explicit));
if (obj instanceof DigestInfo) { return (DigestInfo)obj; } else if (obj instanceof ASN1Sequence) { return new DigestInfo((ASN1Sequence)obj); } throw new IllegalArgumentException("unknown object in factory");
ASN1EncodableVector v = new ASN1EncodableVector(); v.add(algId); v.add(new DEROctetString(digest)); return new DERSequence(v);