toPem method

String toPem({
  1. bool toPkcs1 = true,
})

Implementation

String toPem({bool toPkcs1 = true}) {
  String asn1 = toASN1(toPkcs1: toPkcs1);
  String label = toPkcs1 ? 'RSA PRIVATE KEY' : 'PRIVATE KEY';
  return PemPart(label, asn1).toString();
}