Add var declaration to des.js and use strict mode
This commit is contained in:
parent
05e441b8ad
commit
bc5eb03ccd
|
@ -25,6 +25,7 @@
|
|||
* @module crypto/cipher/des
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
function des(keys, message, encrypt, mode, iv, padding) {
|
||||
//declaring this locally speeds things up a bit
|
||||
|
@ -303,7 +304,7 @@ function des_createKeys(key) {
|
|||
right = temp;
|
||||
|
||||
//now go through and perform these shifts on the left and right keys
|
||||
for (i = 0; i < shifts.length; i++) {
|
||||
for (var i = 0; i < shifts.length; i++) {
|
||||
//shift the keys either one or two bits to the left
|
||||
if (shifts[i]) {
|
||||
left = (left << 2) | (left >>> 26);
|
||||
|
|
Loading…
Reference in New Issue
Block a user