AlgorithmIdentifier.fromAsn1 constructor

AlgorithmIdentifier.fromAsn1(
  1. ASN1Sequence sequence
)

AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL } -- contains a value of the type -- registered for use with the -- algorithm object identifier value

Implementation

factory AlgorithmIdentifier.fromAsn1(ASN1Sequence sequence) {
  var algorithm = toDart(sequence.elements[0]);
  var parameters =
      sequence.elements.length > 1 ? toDart(sequence.elements[1]) : null;
  return AlgorithmIdentifier(algorithm, parameters);
}