Skip to content

Commit

Permalink
updated already existing built files
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
  • Loading branch information
hxw committed Oct 4, 2014
1 parent 81077c0 commit 7461bf3
Show file tree
Hide file tree
Showing 25 changed files with 383 additions and 367 deletions.
14 changes: 7 additions & 7 deletions build/components/core-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions build/components/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,11 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
}
} else if (thatWords.length > 0xffff) {
} else {
// Copy one word at a time
for (var i = 0; i < thatSigBytes; i += 4) {
thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
}
} else {
// Copy all words at once
thisWords.push.apply(thisWords, thatWords);
}
this.sigBytes += thatSigBytes;

Expand Down Expand Up @@ -279,8 +276,27 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
*/
random: function (nBytes) {
var words = [];
for (var i = 0; i < nBytes; i += 4) {
words.push((Math.random() * 0x100000000) | 0);

var r = (function (m_w) {
var m_w = m_w;
var m_z = 0x3ade68b1;
var mask = 0xffffffff;

return function () {
m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;
m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;
var result = ((m_z << 0x10) + m_w) & mask;
result /= 0x100000000;
result += 0.5;
return result * (Math.random() > .5 ? 1 : -1);
}
});

for (var i = 0, rcache; i < nBytes; i += 4) {
var _r = r((rcache || Math.random()) * 0x100000000);

rcache = _r() * 0x3ade67b7;
words.push((_r() * 0x100000000) | 0);
}

return new WordArray.init(words, nBytes);
Expand Down
Binary file modified build/crypto-js.tar.gz
Binary file not shown.
Loading

0 comments on commit 7461bf3

Please sign in to comment.