Skip to main content

Class: NodeContentHasher

Defined in: packages/core/src/infrastructure/node/content-hasher.ts:5

SHA-256 content hasher using Node.js crypto module.

Extends​

Constructors​

Constructor​

new NodeContentHasher(): NodeContentHasher

Returns​

NodeContentHasher

Inherited from​

ContentHasher.constructor

Methods​

hash()​

hash(content): string

Defined in: packages/core/src/infrastructure/node/content-hasher.ts:12

Compute a SHA-256 hash and return it in sha256:<hex> format.

Parameters​

content​

string

The content string to hash

Returns​

string

The hash in sha256:<hex> format

Overrides​

ContentHasher.hash