class Hash
extends Transform
import { Hash } from "https://dotland.deno.dev/std@0.110.0/node/crypto.ts";
The Hash class is a utility for creating hash digests of data. It can be used in one of two ways:
- As a stream that is both readable and writable, where data is written to produce a computed hash digest on the readable side, or
- Using the hash.update() and hash.digest() methods to produce the computed hash.
The crypto.createHash() method is used to create Hash instances. Hash objects are not to be created directly using the new keyword.
Constructors
new
Hash(algorithm: string | wasmCrypto.DigestContext, _opts?: TransformOptions)