signedAttributes property

Iterable<MapEntry<ASN1ObjectIdentifier, List<ASN1Object>>> get signedAttributes

Signed attributes

Implementation

Iterable<MapEntry<ASN1ObjectIdentifier, List<ASN1Object>>>
get signedAttributes sync* {
  if (_signedAttrs == null) {
    return;
  }

  var o = 0;
  while (o < _signedAttrs!.valueByteLength!) {
    final c =
        ASN1Parser(_signedAttrs!.valueBytes!.sublist(o)).nextObject()
            as ASN1Sequence;

    final id = c.elements![0] as ASN1ObjectIdentifier;
    final value = c.elements![1] as ASN1Set;
    yield MapEntry<ASN1ObjectIdentifier, List<ASN1Object>>(
      id,
      value.elements!,
    );

    o += c.encodedBytes!.lengthInBytes;
  }
}