
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
bling-hashes
Advanced tools
String hash algorithms for node.js.
$ npm install --save bling-hashes
There are 8 algorithms so far.
The benchmark, performance and implementation can be referenced here (各种字符串Hash函数比较).
First you should require this package.
var bling = require("bling-hashes");
And then you can pass any string to functions (the same name as algorithms, in lowercase).
Eg.
var hash1 = bling.bkdr("Hello world!"); ///< 501511565
var hash2 = bling.city32("玉扣"); ///< 887335438
BKDR
to ELF
, the functions return a Number
value;city32
returns a Number
value too;city64
returns a Long
value which may refer here;city128
returns a City128Value
value which has properties below:
.toString()
: The string value of the 128-bit number;.toLongArray()
: An array that includes two 64-bit Long
value;.toBuffers()
: An array that includes two Buffer
s..toBigNumber()
: A BigNumber
value which may refer here;Thanks to BYVoid. The C++ implementation code was copied from his blog.
You're welcome to make pull requests.
「雖然我覺得不怎麼可能有人會關注我」
FAQs
String hash algorithms.
The npm package bling-hashes receives a total of 213 weekly downloads. As such, bling-hashes popularity was classified as not popular.
We found that bling-hashes 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.