Skip to content

Commit 3134b3a

Browse files
Jeff.Mott.ORJeff.Mott.OR
Jeff.Mott.OR
authored and
Jeff.Mott.OR
committed
Cosmetic.
1 parent 62c95e9 commit 3134b3a

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

branches/4.x/src/core.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
389389
var sigBytes = wordArray.sigBytes;
390390

391391
// Convert
392-
var hexChars = '';
392+
var hexStr = '';
393393
for (var i = 0; i < sigBytes; i++) {
394394
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
395-
hexChars += (bite >>> 4).toString(16) + (bite & 0xf).toString(16);
395+
hexStr += (bite >>> 4).toString(16) + (bite & 0xf).toString(16);
396396
}
397397

398-
return hexChars;
398+
return hexStr;
399399
},
400400

401401
/**
@@ -407,7 +407,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
407407
*
408408
* @static
409409
*
410-
* @throws HexOctetError
410+
* @throws OctetError
411411
*
412412
* @example
413413
*
@@ -420,7 +420,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
420420
// <?php if ($debug): ?>
421421
{
422422
if (hexStrLength % 2 !== 0) {
423-
throw new HexOctetError('The hex string must represent a whole number of bytes.');
423+
throw new OctetError('The hex string must represent a whole number of bytes.');
424424
}
425425
}
426426
// <?php endif ?>
@@ -467,13 +467,13 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
467467
var sigBytes = wordArray.sigBytes;
468468

469469
// Convert
470-
var latin1Chars = '';
470+
var latin1Str = '';
471471
for (var i = 0; i < sigBytes; i++) {
472472
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
473-
latin1Chars += String.fromCharCode(bite);
473+
latin1Str += String.fromCharCode(bite);
474474
}
475475

476-
return latin1Chars;
476+
return latin1Str;
477477
},
478478

479479
/**
@@ -655,7 +655,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
655655
var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
656656

657657
// Process blocks
658-
if (nBlocksReady) {
658+
if (nWordsReady) {
659659
for (var offset = 0; offset < nWordsReady; offset += blockSize) {
660660
// Perform concrete-algorithm logic
661661
this._doProcessBlock(dataWords.slice(offset, offset + blockSize));
@@ -728,6 +728,8 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
728728

729729
/**
730730
* Constructor.
731+
*
732+
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
731733
*/
732734
constructor: function (cfg) {
733735
// Apply config defaults
@@ -846,6 +848,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
846848
* Shortcut to a hasher's object interface.
847849
*
848850
* @param {WordArray|string} message The message to hash.
851+
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
849852
*
850853
* @return {WordArray} The hash.
851854
*
@@ -870,9 +873,9 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
870873
var C_ERR = C.err = {};
871874

872875
/**
873-
* Hex octet error.
876+
* Octet error.
874877
*/
875-
var HexOctetError = C_ERR.HexOctetError = O.extend.call(Error);
878+
var OctetError = C_ERR.OctetError = O.extend.call(Error);
876879

877880
/**
878881
* Malformed UTF-8 error.

0 commit comments

Comments
 (0)