Skip to content
Prev Previous commit
crypto: improve createCipher testing
  • Loading branch information
Ian Carroll committed Oct 8, 2017
commit 002598332b71bfb7f81cbfcbe0cd986c933a07c6
4 changes: 2 additions & 2 deletions benchmark/crypto/cipher-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function main(conf) {
const key = crypto.generateLegacyKey(conf.cipher, alice_secret);
const iv = crypto.generateLegacyIV(conf.cipher, alice_secret);

var alice_cipher = crypto.createCipheriv(conf.cipher, key, iv);
var bob_cipher = crypto.createDecipheriv(conf.cipher, key, iv);
const alice_cipher = crypto.createCipheriv(conf.cipher, key, iv);
const bob_cipher = crypto.createDecipheriv(conf.cipher, key, iv);

var message;
var encoding;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ if (!common.hasFipsCrypto) {
assert.throws(() => {
crypto.createCipher('aes-128-ecb', 'this-should-throw');
}, /not supported in FIPS mode/);
}
}
4 changes: 0 additions & 4 deletions test/parallel/test-crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ testImmutability(crypto.getCurves);

// Regression tests for #5725: hex input that's not a power of two should
// throw, not assert in C++ land.
if (common.hasFipsCrypto) {

}

assert.throws(function() {
crypto.createCipher('aes192', 'test').update('0', 'hex');
}, common.hasFipsCrypto ? /not supported in FIPS mode/ : /Bad input string/);
Expand Down