Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/src/crypto.ts>pubkeyVerify

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

Verify signature using public-key.

Examples

Example 1

const bin = await Deno.readFile("./file");
const key = await pubkeyGen("ECDSA");
const signature = await pubkeySign(key.privateKey, bin);
const verified = await pubkeyVerify(key.publicKey, signature, bin);

Parameters

publicKey: Uint8Array
signature: Uint8Array
data: Uint8Array

Returns

Promise<boolean>