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