Skip to main content
Go to Latest
method Hash.prototype.digest
import { Hash } from "https://deno.land/std@0.166.0/node/internal/crypto/hash.ts";

Calculates the digest of all of the data.

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

Supported encodings are currently 'hex', 'binary', 'base64', 'base64url'.

Parameters

optional
encoding: string

Returns

Buffer | string