[Pkg-javascript-commits] [node-browserify-aes] 48/92: make mode names case insensitive

Bastien Roucariès rouca at moszumanska.debian.org
Sun Jun 4 09:35:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-browserify-aes.

commit 902a38cc1285b9b8e10c88dafe9c4288eb3ee57b
Author: Nadav Ivgi <git at shesek.info>
Date:   Fri Jan 2 15:40:05 2015 +0200

    make mode names case insensitive
---
 decrypter.js | 4 ++--
 encrypter.js | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/decrypter.js b/decrypter.js
index 6214d06..525207f 100644
--- a/decrypter.js
+++ b/decrypter.js
@@ -101,7 +101,7 @@ var modelist = {
 
 module.exports = function (crypto) {
   function createDecipheriv(suite, password, iv) {
-    var config = modes[suite];
+    var config = modes[suite.toLowerCase()];
     if (!config) {
       throw new TypeError('invalid suite type');
     }
@@ -126,7 +126,7 @@ module.exports = function (crypto) {
   }
 
   function createDecipher (suite, password) {
-    var config = modes[suite];
+    var config = modes[suite.toLowerCase()];
     if (!config) {
       throw new TypeError('invalid suite type');
     }
diff --git a/encrypter.js b/encrypter.js
index bec77f7..dbaf663 100644
--- a/encrypter.js
+++ b/encrypter.js
@@ -85,7 +85,7 @@ var modelist = {
 };
 module.exports = function (crypto) {
   function createCipheriv(suite, password, iv) {
-    var config = modes[suite];
+    var config = modes[suite.toLowerCase()];
     if (!config) {
       throw new TypeError('invalid suite type');
     }
@@ -109,7 +109,7 @@ module.exports = function (crypto) {
     return new Cipher(modelist[config.mode], password, iv);
   }
   function createCipher (suite, password) {
-    var config = modes[suite];
+    var config = modes[suite.toLowerCase()];
     if (!config) {
       throw new TypeError('invalid suite type');
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browserify-aes.git



More information about the Pkg-javascript-commits mailing list