Skip to content

Commit 7660d10

Browse files
Merge pull request #60 from mohawk2/tweaks
nodejs tweaks
2 parents 4879d4e + b220cfd commit 7660d10

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

nodejs/ece.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function deriveKeyAndNonce(header, mode, lookupKeyCallback) {
222222
nonceInfo = Buffer.from('Content-Encoding: nonce\0');
223223
secret = extractSecret(header, mode, lookupKeyCallback);
224224
} else {
225-
throw new Error('Unable to set context for mode ' + params.version);
225+
throw new Error('Unable to set context for mode ' + header.version);
226226
}
227227
var prk = HKDF_extract(header.salt, secret);
228228
var result = {

nodejs/test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var assert = require('assert');
88
function usage() {
99
console.log('Usage: node test.js [args]');
1010
console.log(' <version> - test only the specified version(s)');
11-
console.log(' Supported: [aes128gcm,aesgcm,aesgcm128]');
11+
console.log(' Supported: [aes128gcm,aesgcm]');
1212
console.log(' <test function> - test only the specified function(s)');
1313
console.log(' "verbose" enable logging for tests (export ECE_KEYLOG=1 for more)');
1414
console.log(' "text=..." sets the input string');
@@ -116,9 +116,6 @@ function generateInput(min) {
116116
}
117117

118118
function rsoverhead(version) {
119-
if (version === 'aesgcm128') {
120-
return 1;
121-
}
122119
if (version === 'aesgcm') {
123120
return 2;
124121
}
@@ -397,7 +394,7 @@ function useCustomCallback(version) {
397394
}
398395

399396
validate();
400-
filterTests([ 'aesgcm128', 'aesgcm', 'aes128gcm' ])
397+
filterTests([ 'aesgcm', 'aes128gcm' ])
401398
.forEach(function(version) {
402399
filterTests([ useExplicitKey,
403400
authenticationSecret,

0 commit comments

Comments
 (0)