Skip to main content
Module

x/simple_utility/mod.ts>deriveHash

Useful snippet collection.
Go to Latest
function deriveHash
import { deriveHash } from "https://deno.land/x/simple_utility@v1.5.1/mod.ts";

Derive SHA2 hash value from binary.

Examples

Example 1

const bin = await Deno.readFile("./file");
const hash = await deriveHash(256, bin);

Parameters

bit: 256 | 384 | 512
data: Uint8Array

Returns

Promise<Uint8Array>