fromPem static method

SecretKey fromPem(
  1. String pem
)

Parses a PEM string into a private key.

Throws if pem is not a single PRIVATE KEY block holding an X-Wing private key. The block starts at the first byte, uses strict base64 and ends all its lines in LF or all in CRLF.

Implementation

static SecretKey fromPem(String pem) =>
    SecretKey._(ffi.XhpkeSecretKey.fromPem(pem: pem));