ASN1DigestInfo.fromSequence constructor
ASN1DigestInfo.fromSequence(
- ASN1Sequence seq
Implementation
ASN1DigestInfo.fromSequence(ASN1Sequence seq) {
if (seq.elements!.length != 2) {
throw ArgumentError('Sequence has not enough elements');
}
digestAlgorithm = ASN1AlgorithmIdentifier.fromSequence(
seq.elements!.elementAt(0) as ASN1Sequence);
var o = seq.elements!.elementAt(1) as ASN1OctetString;
if (o.valueBytes != null) {
digest = o.valueBytes!;
}
}