dco_decode_rsa_key_pair method

  1. @protected
RsaKeyPair dco_decode_rsa_key_pair(
  1. dynamic raw
)

Implementation

@protected
RsaKeyPair dco_decode_rsa_key_pair(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
  return RsaKeyPair(
    privateKeyPem: dco_decode_String(arr[0]),
    publicKeyPem: dco_decode_String(arr[1]),
  );
}