import { generateSecret } from "https://deno.land/x/jose@v4.11.2/key/generate_secret.ts";
Generates a symmetric secret key for a given JWA algorithm identifier.
Note: Under Web Cryptography API runtime the secret key is generated with extractable
set to
false
by default.
Examples
Usage
Usage
const secret = await jose.generateSecret('HS256')
console.log(secret)
Parameters
optional
options: GenerateSecretOptionsAdditional options passed down to the secret generation.