ASN1CertificationRequestInfo.fromSequence constructor

ASN1CertificationRequestInfo.fromSequence(
  1. ASN1Sequence seq
)

Implementation

ASN1CertificationRequestInfo.fromSequence(ASN1Sequence seq) {
  if (seq.elements == null || seq.elements!.length != 3) {
    throw ArgumentError('');
  }
  if (seq.elements!.elementAt(0) is! ASN1Integer) {
    throw ArgumentError('Element at index 0 has to be ASN1Integer');
  }
  version = seq.elements!.elementAt(0) as ASN1Integer;
}