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>pubkeyVerify

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