Skip to content

Commit 333ae0f

Browse files
bitbandizone117x
authored andcommitted
Rewrite multihashing.cc
1 parent d53a436 commit 333ae0f

File tree

4 files changed

+156
-495
lines changed

4 files changed

+156
-495
lines changed

bcrypt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ static void _crypt_blowfish_rn(const char *key, const char *salt, char *output)
558558
clean(&data, sizeof(data));
559559
}
560560

561-
void bcrypt_hash(const char *in, char *out)
561+
void bcrypt_hash(const char *in, char *out, uint32_t len)
562562
{
563563
_crypt_blowfish_rn(&in[0 * BF_N], &in[1 * BF_N], &out[0 * BF_N]);
564564
_crypt_blowfish_rn(&in[2 * BF_N], &in[3 * BF_N], &out[1 * BF_N]);

bcrypt.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
extern "C" {
66
#endif
77

8-
void bcrypt_hash(const char *input, char *output);
8+
void bcrypt_hash(const char *input, char *output, uint32_t len);
99

1010
#ifdef __cplusplus
1111
}

binding.gyp

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
"target_name": "multihashing",
55
"sources": [
66
"multihashing.cc",
7-
"scryptjane.c",
8-
"scryptn.c",
9-
"keccak.c",
10-
"skein.c",
11-
"x11.c",
12-
"quark.c",
137
"bcrypt.c",
14-
"groestl.c",
158
"blake.c",
9+
"boolberry.cc",
10+
"cryptonight.c",
11+
"fresh.c",
1612
"fugue.c",
17-
"qubit.c",
13+
"groestl.c",
1814
"hefty1.c",
19-
"shavite3.c",
20-
"cryptonight.c",
21-
"x13.c",
22-
"boolberry.cc",
15+
"keccak.c",
2316
"nist5.c",
17+
"quark.c",
18+
"qubit.c",
19+
"scryptjane.c",
20+
"scryptn.c",
2421
"sha1.c",
22+
"shavite3.c",
23+
"skein.c",
24+
"x11.c",
25+
"x13.c",
2526
"x15.c",
26-
"fresh.c",
2727
"sha3/sph_hefty1.c",
2828
"sha3/sph_fugue.c",
2929
"sha3/aes_helper.c",

0 commit comments

Comments
 (0)