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

x/simple_utility/mod.universal.ts>pkSign

Useful snippet collection.
Go to Latest
function pkSign
import { pkSign } from "https://deno.land/x/simple_utility@v1.5.2/mod.universal.ts";

Create signature using private-key.

Examples

Example 1

const bin = await Deno.readFile("./file");
const {publicKey, privateKey} = await pkGenerateECDSA();
const sign = await pkSign(privateKey, bin);
const verify = await pkVerify(publicKey, sign, bin);

Parameters

key: Uint8Array
data: Uint8Array

Returns

Promise<Uint8Array>