dump method

  1. @override
String dump({
  1. int spaces = 0,
})
override

Creates a readable dump from the current ASN1Object.

Important note: Subclasses need to override this method. If the ASN1Object is constructed and has child elements, dump() has to be called for each child element.

Implementation

@override
String dump({int spaces = 0}) {
  var sb = StringBuffer();
  for (var i = 0; i < spaces; i++) {
    sb.write(' ');
  }
  sb.write('SEQUENCE (${elements!.length} elem)');
  for (var e in elements!) {
    var dump = e.dump(spaces: spaces + dumpIndent);
    sb.write('\n$dump');
  }
  return sb.toString();
}