Skip to content

Commit f50b051

Browse files
committed
Fix bug that breaks HMAC routines
Some references: (until googlecode shuts down) https://code.google.com/p/crypto-js/issues/detail?id=84 https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js Signed-off-by: Christopher Hall <hsw@bitmark.com>
1 parent 27c414f commit f50b051

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/core.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,11 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
210210
var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
211211
thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
212212
}
213-
} else if (thatWords.length > 0xffff) {
213+
} else {
214214
// Copy one word at a time
215215
for (var i = 0; i < thatSigBytes; i += 4) {
216216
thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
217217
}
218-
} else {
219-
// Copy all words at once
220-
thisWords.push.apply(thisWords, thatWords);
221218
}
222219
this.sigBytes += thatSigBytes;
223220

0 commit comments

Comments
 (0)