Skip to main content
Module

x/simple_utility/mod.ts>pubkeyGen

Useful snippet collection.
Go to Latest
function pubkeyGen
import { pubkeyGen } from "https://deno.land/x/simple_utility@v1.3.7/mod.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"