Skip to content

Commit 3c67736

Browse files
committed
Fixed randomish bug.
1 parent c697a5b commit 3c67736

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/randomish.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ function Randomish() {
5858
var aesCbc = new aes.ModeOfOperation.cbc(key, this.feedEntropy());
5959
var result = new Buffer(0);
6060
while (result.length < length) {
61-
result = result.concat([result, this.feedEntropy()]);
61+
result = Buffer.concat([result, this.feedEntropy()]);
6262
}
6363

64-
return result;
64+
return result.slice(0, length);
6565
});
6666

6767
this.feedEntropy();

0 commit comments

Comments
 (0)