
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
liamloads-hash
Advanced tools
Calculate fast and secure 32-byte hash strings with JavaScript.
This is a fast and cryptographically-secure hashing algorithm with no known collisions.
It's written in JavaScript and outputs persistent 32-byte hexadecimal digests from variable-length string
payloads.
A complete line-by-line algorithm code explanation is coming soon.
git clone https://github.com/liamloads/javascript-hash.git
<script src="liamloads-hash.js" type="text/javascript"></script>
npm install liamloads-hash
const liamloadsHash = require('liamloads-hash');
The return value is a unique string
hexadecimal number digest with a fixed character length of 64
.
If the argument isn't a string
or if the UTF-16 code unit length exceeds 999999999
, the return value is false
.
console.log(liamloadsHash('0123456789'));
// 'f06dcc113fbffd00fe814d62e93b91c0ab0ddb5505abaac68f5209c1185ad96c'
console.log(liamloadsHash('◯'));
// '6e9e92171e9b118b63f7fd2c0d7242581253047d198478c4a91cc7138ce670f4'
console.log(liamloadsHash(''));
// '9ad3de7c1e4478fd872e6340de0ac2db4bae21b1bcada7cf92b52adf24601c63'
console.log(liamloadsHash(['◯']));
// false
FAQs
Calculate fast and secure 32-byte hash strings with JavaScript.
We found that liamloads-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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.