importSec1PemOrThrow
importSec1PemOrThrow
Import an EC private key from PEM-encoded SEC 1 ECPrivateKey.
Expects the -----BEGIN EC PRIVATE KEY----- PEM label. When algorithm is omitted, the curve is inferred from the embedded parameters [0] field (see importSec1DerOrThrow).
ts
function importSec1PemOrThrow(
pem: string,
algorithm?: ImportEcKeyInput,
): Promise<CryptoKey>Parameters
pem:stringalgorithm?:ImportEcKeyInput
See also
exportSec1Pemfor the inverse operationimportEncryptedSec1Pemfor encrypted PEM