Skip to content

Commit e39c4aa

Browse files
authored
Merge pull request #91 from hackmod/neoscrypt-fix
neoscrypt: use the profile arg correctly
2 parents 17ac08b + 9432279 commit e39c4aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/multihashing.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,16 @@ DECLARE_FUNC(neoscrypt) {
137137
if(!Buffer::HasInstance(target))
138138
RETURN_EXCEPT("Argument should be a buffer object.");
139139

140+
uint32_t profile = Nan::To<uint32_t>(info[1]).ToChecked();
141+
140142
char * input = Buffer::Data(target);
141143
char output[32];
142144

143145
uint32_t input_len = Buffer::Length(target);
144146

145147
if (input_len < 80)
146148
RETURN_EXCEPT("Argument must be longer than 80 bytes");
147-
neoscrypt(input, output, 0);
149+
neoscrypt(input, output, profile);
148150

149151
SET_BUFFER_RETURN(output, 32);
150152
}

0 commit comments

Comments
 (0)