KeyPairMaterial
Key pair with convenience export helpers. Returned by generateKeyPair.
ts
interface KeyPairMaterial {
readonly publicKey: CryptoKey;
readonly privateKey: CryptoKey;
exportSpkiDer(): Promise<Uint8Array>;
exportSpkiPem(): Promise<string>;
exportPkcs8Der(): Promise<Uint8Array>;
exportPkcs8Pem(): Promise<string>;
exportPublicJwk(): Promise<JsonWebKey>;
exportPrivateJwk(): Promise<JsonWebKey>;
}Properties
readonlypublicKey:CryptoKey— The WebCrypto public key (extractable,verifyusage;encryptfor RSA-OAEP).readonlyprivateKey:CryptoKey— The WebCrypto private key (extractable,signusage;decryptfor RSA-OAEP).