serialNumber property

List<int>? get serialNumber

Implementation

List<int>? get serialNumber {
  var sequence = valueAsBlock?.subAtIndex(0)?.sub;
  if (sequence == null) {
    return null;
  }
  ASN1Object? sub;
  try {
    sub = sequence.firstWhere(
        (element) => element.identifier?.tagNumber().toValue() == 2);
    return sub.encoded;
  } catch (e) {}
  return null;
}