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

x/simple_utility/mod.pure.full.ts>cryptoSign

Simplify processing for Deno.
Go to Latest
function cryptoSign
import { cryptoSign } from "https://deno.land/x/simple_utility@v2.2.1/mod.pure.full.ts";

Create signature using private-key.

Examples

Example 1

const bin = await Deno.readFile("./file");
const {pub, key} = await cryptoGenerateSignKey();
const sign = await cryptoSign(bin, key);
const verify = await cryptoVerify(bin, pub, sign);

Parameters

data: Uint8Array
key: Uint8Array

Returns

Promise<Uint8Array>