Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
node-provenance-hash
Advanced tools
A cli tool to use when you need to create a provenance HASH for an HFT project.Can also be used to prove that folder contents have not been changed since creation of the hash
Create a provenance hash for folder contents.
This package is made (but not limited) for NFT projects that have a need to prove that a folder did not have its contents changed. To do this, we do the following:
This gives us a string. In case the order of files has changed or contents of any file has changed, the string we get would change also indicating that the contents of the folder has changed, hence the PROVE in provenance hash. We are proving the contents and ordering is same.
##Usage
hash.ts
import { makeHash } from "node-provenance-hash";
//The following function will sort the files in ascending order using number derived from filename i.e 1.jpg (if it doesn't contain Infinity and NaN)
const numericalCompare = (a: string, b: string): number => {
const fileNameToNumber = (file: string): number => Number(file.split(".")[0]);
return fileNameToNumber(a) - fileNameToNumber(b);
};
makeHash(
__dirname + "/sources/images",
__dirname + "/sources/json",
numericalCompare
).then((data) => console.log(data));
then
ts-node hash.ts
FAQs
A cli tool to use when you need to create a provenance HASH for an HFT project.Can also be used to prove that folder contents have not been changed since creation of the hash
We found that node-provenance-hash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.