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

std/node/crypto.ts>Hash#digest

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Hash.prototype.digest
import { Hash } from "https://deno.land/std@0.92.0/node/crypto.ts";

Calculates the digest of all of the data.

If encoding is provided a string will be returned; otherwise a Buffer is returned.

Supported encoding is currently 'hex' only. 'binary', 'base64' will be supported in the future versions.

Parameters

optional
encoding: string

Returns

Buffer | string