Skip to main content
Hash.prototype.digest - node__crypto.d.ts - Node documentation
method Hash.prototype.digest

Usage in Deno

```typescript import { Hash } from "node:node__crypto.d.ts"; ```
Hash.prototype.digest(): Buffer
Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). If `encoding` is provided a string will be returned; otherwise a `Buffer` is returned. The `Hash` object can not be used again after `hash.digest()` method has been called. Multiple calls will cause an error to be thrown.

Return Type

Buffer
Hash.prototype.digest(encoding: BinaryToTextEncoding): string

Parameters

Return Type

string