-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
executable file
·50 lines (45 loc) · 1.17 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
var nodehashes = require('./build/Release/nodehashes');
module.exports = (function() {
return {
RSHash : function(str) {
return nodehashes.hash("RSHash", str);
},
JSHash: function(str) {
return nodehashes.hash("JSHash", str);
},
PJWHash: function(str) {
return nodehashes.hash("PJWHash", str);
},
ELFHash: function(str) {
return nodehashes.hash("ELFHash", str);
},
BKDRHash: function(str) {
return nodehashes.hash("BKDRHash", str);
},
SDBMHash: function(str) {
return nodehashes.hash("SDBMHash", str);
},
DJBHash: function(str) {
return nodehashes.hash("DJBHash", str);
},
DEKHash: function(str) {
return nodehashes.hash("DEKHash", str);
},
BPHash: function(str) {
return nodehashes.hash("BPHash", str);
},
FNVHash: function(str) {
return nodehashes.hash("FNVHash", str);
},
APHash: function(str) {
return nodehashes.hash("APHash", str);
},
MurmurHash3_x86_32: function(str, seed) {
return nodehashes.murmurhash("MurmurHash3_x86_32", str, seed);
},
MurmurHash3_x86_128: function(str, seed) {
return nodehashes.murmurhash("MurmurHash3_x86_128", str, seed);
}
};
})();