asn1ToString method Null safety

String asn1ToString(
  1. dynamic obj
)

Implementation

String asn1ToString(dynamic obj) {
  if (obj is ASN1Object) {
    obj = asn1ToDart(obj);
  }

  if (obj is String) {
    return obj;
  }
  if (obj is Uint8List) {
    return toHex(obj);
  }
  if (obj is ASN1ObjectIdentifier) {
    return obj.name;
  }

  return obj.toString();
}