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

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

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

Derive hash value from binary. Default is SHA-256.

Examples

Example 1

const bin = await Deno.readFile("./file");
const hash = await cryptoHash(bin);

Parameters

data: Uint8Array
optional
alg: string

Returns

Promise<Uint8Array>