Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/simple_utility/src/crypto.ts>pkVerify

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

Verify signature using public-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
sign: Uint8Array
data: Uint8Array

Returns

Promise<boolean>