[Pkg-javascript-commits] [node-browserify-aes] 59/92: Changed a reserved word parameter that causes a Closure Compiler error

Bastien Roucariès rouca at moszumanska.debian.org
Sun Jun 4 09:35:20 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 987ff859058f95f8da98e7236229efd7c1b81ef7
Author: Kevin Johnson <kevinejohn at gmail.com>
Date:   Thu Apr 16 18:35:17 2015 -0700

    Changed a reserved word parameter that causes a Closure Compiler error
---
 modes/cfb1.js | 6 +++---
 modes/cfb8.js | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modes/cfb1.js b/modes/cfb1.js
index 3bad04f..ff39ce9 100644
--- a/modes/cfb1.js
+++ b/modes/cfb1.js
@@ -1,5 +1,5 @@
 
-function encryptByte(self, byte, decrypt) {
+function encryptByte(self, byteParam, decrypt) {
   var pad;
   var i = -1;
   var len = 8;
@@ -7,7 +7,7 @@ function encryptByte(self, byte, decrypt) {
   var bit, value;
   while (++i < len) {
     pad = self._cipher.encryptBlock(self._prev);
-    bit = (byte & (1 << (7-i))) ? 0x80:0;
+    bit = (byteParam & (1 << (7-i))) ? 0x80:0;
     value = pad[0] ^ bit;
     out += ((value&0x80) >> (i%8));
     self._prev = shiftIn(self._prev, decrypt?bit:value);
@@ -32,4 +32,4 @@ function shiftIn(buffer, value) {
     out[i] = buffer[i]<<1 | buffer[i+1]>>(7);
   }
   return out;
-}
\ No newline at end of file
+}
diff --git a/modes/cfb8.js b/modes/cfb8.js
index 31ac52c..046b30c 100644
--- a/modes/cfb8.js
+++ b/modes/cfb8.js
@@ -1,7 +1,7 @@
-function encryptByte(self, byte, decrypt) {
+function encryptByte(self, byteParam, decrypt) {
   var pad = self._cipher.encryptBlock(self._prev);
-  var out = pad[0] ^ byte;
-  self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt?byte:out])]);
+  var out = pad[0] ^ byteParam;
+  self._prev = Buffer.concat([self._prev.slice(1), new Buffer([decrypt?byteParam:out])]);
   return out;
 }
 exports.encrypt = function (self, chunk, decrypt) {
@@ -12,4 +12,4 @@ exports.encrypt = function (self, chunk, decrypt) {
     out[i] = encryptByte(self, chunk[i], decrypt);
   }
   return out;
-};
\ No newline at end of file
+};

-- 
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