asn1ToDart method Null safety

dynamic asn1ToDart(
  1. ASN1Object obj
)

Implementation

dynamic asn1ToDart(ASN1Object obj) {
  if (obj is ASN1OctetString) {
    return obj.octets;
  }
  if (obj is ASN1PrintableString) {
    return obj.stringValue;
  }
  if (obj is ASN1IA5String) {
    return obj.stringValue;
  }
  if (obj is ASN1UTF8String) {
    return obj.utf8StringValue;
  }
  if (obj is ASN1TeletextString) {
    return obj.stringValue;
  }
  if (obj is ASN1ObjectIdentifier) {
    return obj;
  }
  if (obj is ASN1UtcTime) {
    return obj.time;
  }
  return obj;
}