deserialize method

  1. @override
void deserialize(
  1. SerializableInput input
)
override

https://gist.github.com/proteye/982d9991922276ccfb011dfc55443d74

Implementation

@override
void deserialize(SerializableInput input) {
  ASN1Parser asn1Parser = ASN1Parser(input.viewRemaining());
  ASN1Sequence pkSeq = asn1Parser.nextObject();
  version = (pkSeq.elements[0] as ASN1Integer).valueAsBigInteger;
  n = (pkSeq.elements[1] as ASN1Integer).valueAsBigInteger;
  e = (pkSeq.elements[2] as ASN1Integer).valueAsBigInteger;
  d = (pkSeq.elements[3] as ASN1Integer).valueAsBigInteger;
  p = (pkSeq.elements[4] as ASN1Integer).valueAsBigInteger;
  q = (pkSeq.elements[5] as ASN1Integer).valueAsBigInteger;
  exponent1 = (pkSeq.elements[6] as ASN1Integer).valueAsBigInteger;
  exponent2 = (pkSeq.elements[7] as ASN1Integer).valueAsBigInteger;
  coefficient = (pkSeq.elements[8] as ASN1Integer).valueAsBigInteger;
}