
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Is a FAST nodejs(http://github.com/ry/node/) library for making hashes written in C/C++
Supports: md4, md5, md6, sha, sha1, sha256, sha512, hmac_sha1, hmac_md5, also can make md5 hash of files
Thangs to Vanilla Hsu for speed improvements and md4, sha support
go to the directory with hashlib library
execute node-waf configure build
get module from ./build/default/hashlib.node
You should use var hashlib = require("./build/default/hashlib");
(way to module)
go to the directory with hashlib library
execute make
execute sudo make install
You should use var hashlib = require("hashlib");
(from any path)
md4(str); // Returns md4 hash from sting
md5(str); // Returns md5 hash from sting
sha(str); // Returns sha hash from sting
sha1(str); // Returns sha1 hash from sting
sha256(str); // Returns sha256 hash from sting
sha512(str); // Returns sha512 hash from sting
md6(str[, length]); // Returns md6 hash from sting, second parametr is optional
md5_file(path[, callback]); // Returns md5 hash from file callback is optional and works async
hmac_sha1(str, key) // Returns hmac sha1 hash with an key
hmac_md5(str, key) // Returns hmac md5 hash with an key
var hashlib = require('hashlib');
hashlib.md5('text');
To run speed test on your computer run test.js, here is my: C++ md5 result is: 220 JS md5 result is: 5660 C++ module faster than JS in 25.727272727272727 times ----------- C++ md4 result is: 212 C++ md6 result is: 3889 C++ sha0 result is: 228 C++ sha1 result is: 495 C++ sha256 result is: 712 C++ sha512 result is: 612
// Smaller is better
Other modules, engines md5 comparsion: hashlib: 220 node-crypto: 1055 python-hashlib: 265 php: 179
// Smaller is better
FAQs
lib for node which makes hashes
The npm package hashlib receives a total of 102 weekly downloads. As such, hashlib popularity was classified as not popular.
We found that hashlib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.