Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/somefn/js/hash.ts>hashString

some functions for deno
Go to Latest
function hashString
import { hashString } from "https://deno.land/x/somefn@v0.27.0/js/hash.ts";

获取数据散列值

Parameters

algorithm: "SHA-1" | "SHA-256" | "SHA-512"

可选 SHA-1 等算法, 不支持 MD5

d: string | Uint8Array

需要计算散列值的数据

Returns

Promise<string>

数据的散列值