Skip to content
masterclass Buddy

Node.js · Function

createHash

The Hash class creates hash digests from data. Use createHash() to make one, update() to add data, and digest() to get the result.

Last updated

Since
v0.1.92

Syntax

crypto.createHash(algorithm[, options])
hash.update(data[, inputEncoding])
hash.digest([encoding])

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • crypto.createHash
  • Hash.copy
  • Hash.update
  • Hash.digest
  • crypto.getHashes

Source: Hash | Node.js 26.13.0 Documentation. Checked 2026-11-03.