Skip to main content
Module

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

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

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

Examples

Example 1

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

Parameters

data: Uint8Array
optional
sha: `SHA-${256 | 384 | 512}`

Returns

Promise<Uint8Array>