Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/simple_utility/src/crypto.ts>pubkeyGen

Useful snippet collection.
Go to Latest
function pubkeyGen
import { pubkeyGen } from "https://deno.land/x/simple_utility@v0.5.4/src/crypto.ts";

Generate exportable public-key pair. You can generate keys for ECDH or ECDSA. Algorithm use is "NIST P-512".

Examples

Example 1

const key1 = await pubkeyGen("ECDH");
const key2 = await pubkeyGen("ECDSA");

Parameters

usage: "ECDH" | "ECDSA"