encodePkcs1 method Null safety

String encodePkcs1 ()

Encode as PEM encoded PKCS#1 (often just called "PEM").

From RFC 3447:

RSAPublicKey ::= SEQUENCE {
  modulus           INTEGER,  -- n
  publicExponent    INTEGER   -- e
}

Programs normally use encode method from the PublicKeyExt extension, with the appropriate format, which will invoke this method.

Implementation

String encodePkcs1() {
  final container = TextualEncoding(_rsaPkcs1label, _pkcs1bytes());
  return container.encode();
}