Skip to main content
Module

x/deno_cache/util.ts>hash

A TypeScript implementation of Deno CLI's module cache
Extremely Popular
Go to Latest
function hash
import { hash } from "https://deno.land/x/deno_cache@0.4.1/util.ts";

Generates a sha256 hex hash for a given input string. This mirrors the behavior of Deno CLI's cli::checksum::gen.

Would love to use the Crypto API here, but it only works async and we need to be able to generate the hashes sync to be able to keep the cache able to look up files synchronously.

Parameters

value: string

Returns

string