MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / computeHash

Function computeHash

out/cli.cjs:84917–84926  ·  view source on GitHub ↗
(content, algorithm = "sha256")

Source from the content-addressed store, hash-verified

84915 }
84916}
84917
84918// src/modules/commitlint/constants.ts
84919var COMMITLINT_LLM_CONFIG_PATH = `${process.env.PWD}/.opencommit-commitlint`;
84920
84921// src/modules/commitlint/crypto.ts
84922var import_crypto3 = __toESM(require("crypto"), 1);
84923var computeHash = async (content, algorithm = "sha256") => {
84924 try {
84925 const hash = import_crypto3.default.createHash(algorithm);
84926 hash.update(content);
84927 return hash.digest("hex");
84928 } catch (error) {
84929 console.error("Error while computing hash:", error);

Callers 1

Calls 2

updateMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…