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 = ;
And then you can pass any string to functions (the same name as algorithms, in lowercase).
var hash1 = bling; ///< 501511565var hash2 = bling; ///< 887335438
ELF, the functions return a
Longvalue which may refer here;
City128Valuevalue which has properties below:
.toString(): The string value of the 128-bit number;
.toLongArray(): An array that includes two 64-bit
.toBuffers(): An array that includes two
BigNumbervalue which may refer here;
Thanks to BYVoid. The C++ implementation code was copied from his blog.
You're welcome to make pull requests.