namesFromAsn1 method Null safety

Iterable<MapEntry<ASN1ObjectIdentifier, dynamic>> namesFromAsn1(
  1. ASN1Sequence sequence
)

Parse a list of names

Implementation

Iterable<MapEntry<ASN1ObjectIdentifier, dynamic>> namesFromAsn1(
    ASN1Sequence sequence) sync* {
  for (final p in sequence.elements!) {
    if (p is ASN1Set) {
      for (final q in p.elements!) {
        if (q is ASN1Sequence) {
          final r = q.elements![0];
          if (r is ASN1ObjectIdentifier) {
            yield MapEntry<ASN1ObjectIdentifier, dynamic>(
                r, asn1ToDart(q.elements![1]));
          }
        }
      }
    }
  }
}