createHash()

The node:crypto function that creates a hash object: feed it data with update() and get the result with digest().

In more detail

For example createHash("sha256").update(data).digest("hex") returns a SHA-256 hash as hex. crypto.hash() is a shorter one-call version in recent Node.js.

Related terms

Taught in

References