Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.2/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>