import { generateKeyPair } from "https://dotland.deno.dev/x/jose@v5.9.6/key/generate_key_pair.ts";
Generates a private and a public key for a given JWA algorithm identifier. This can only generate
asymmetric key pairs. For symmetric secrets use the generateSecret
function.
Note: Under Web Crypto API runtime the privateKey
is generated with extractable
set to
false
by default. See {@link GenerateKeyPairOptions.extractable} to generate an extractable
privateKey
.
This function is exported (as a named export) from the main 'jose'
module entry point as well
as from its subpath export 'jose/generate/keypair'
.
Returns
Promise<GenerateKeyPairResult<KeyLikeType>>