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

x/simple_utility/mod.pure.ts>cryptoHash

Simplify processing for Deno.
Latest
function cryptoHash
import { cryptoHash } from "https://deno.land/x/simple_utility@v2.2.1/mod.pure.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>