Skip to content

Commit 6e919c6

Browse files
committed
Fix input generation
1 parent 3d844b9 commit 6e919c6

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

nodejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "martin.thomson@gmail.com"
1010
},
1111
"contributors": [{
12-
"name": Marco Castelluccio",
12+
"name": "Marco Castelluccio",
1313
"email": "mcastelluccio@mozilla.com"
1414
}],
1515
"repository": {

nodejs/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ function validate() {
6868
});
6969
}
7070

71-
function generateInput(minLength) {
72-
if (typeof minLength === 'undefined') {
73-
minLength = 0;
71+
function generateInput(len) {
72+
if (typeof len === 'undefined') {
73+
len = 0;
7474
}
7575
var input = plaintext ||
76-
crypto.randomBytes(Math.max(minLength, Math.min(length, maxLen)));
77-
if (input.length < minLength) {
76+
crypto.randomBytes(Math.max(minLen, Math.min(len, maxLen)));
77+
if (input.length < minLen) {
7878
throw new Error('Plaintext is too short');
7979
}
8080
logbuf('Input', input);

0 commit comments

Comments
 (0)