Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
Import 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiebremer committed Jul 7, 2022
1 parent b369c6d commit de9c46d
Show file tree
Hide file tree
Showing 125 changed files with 2,966 additions and 954 deletions.
12 changes: 6 additions & 6 deletions build/components/aes-min.js

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

16 changes: 8 additions & 8 deletions build/components/aes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
Expand Down Expand Up @@ -65,7 +65,7 @@
INV_SUB_MIX_3[sx] = t;

// Compute next counter
if ( ! x) {
if (!x) {
x = xi = 1;
} else {
x = x2 ^ d[d[d[x8 ^ x2]]];
Expand Down Expand Up @@ -101,7 +101,7 @@
} else {
var t = keySchedule[ksRow - 1];

if ( ! (ksRow % keySize)) {
if (!(ksRow % keySize)) {
// Rot word
t = (t << 8) | (t >>> 24);

Expand Down
12 changes: 6 additions & 6 deletions build/components/cipher-core-min.js

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

16 changes: 8 additions & 8 deletions build/components/cipher-core.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/**
* Cipher core components.
*/
Expand Down Expand Up @@ -758,7 +758,7 @@ CryptoJS.lib.Cipher || (function (undefined) {
*/
execute: function (password, keySize, ivSize, salt) {
// Generate random salt
if ( ! salt) {
if (!salt) {
salt = WordArray.random(64/8);
}

Expand All @@ -775,7 +775,7 @@ CryptoJS.lib.Cipher || (function (undefined) {
};

/**
* A cipher wrapper that derives the key from a password,
* A serializable cipher wrapper that derives the key from a password,
* and returns ciphertext as a serializable cipher params object.
*/
var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
Expand Down
12 changes: 6 additions & 6 deletions build/components/core-min.js

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

20 changes: 11 additions & 9 deletions build/components/core.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/**
* CryptoJS core components.
*/
Expand Down Expand Up @@ -164,7 +164,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
/**
* Converts this word array to a string.
*
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: Hex
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
*
* @return {string} The stringified word array.
*
Expand Down Expand Up @@ -273,7 +273,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {
});

/**
* Encoding namespace.
* Encoder namespace.
*/
var C_enc = C.enc = {};

Expand Down Expand Up @@ -441,6 +441,7 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {

/**
* Abstract buffered block algorithm template.
*
* The property blockSize must be implemented in a concrete subtype.
*
* @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
Expand Down Expand Up @@ -482,9 +483,10 @@ var CryptoJS = CryptoJS || (function (Math, undefined) {

/**
* Processes available data blocks.
*
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
*
* @param {boolean} flush Whether all blocks and partial blocks should be processed.
* @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
*
* @return {WordArray} The processed data.
*
Expand Down
12 changes: 6 additions & 6 deletions build/components/enc-base64-min.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function(){var h=CryptoJS,i=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();for(var b=[],a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<
e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return i.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
12 changes: 6 additions & 6 deletions build/components/enc-base64.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
Expand Down
14 changes: 7 additions & 7 deletions build/components/enc-utf16-min.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
(function(){var e=CryptoJS,f=e.lib.WordArray;e.enc.Utf16={stringify:function(b){for(var d=b.words,b=b.sigBytes,c=[],a=0;a<b;a+=2)c.push(String.fromCharCode(d[a>>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a<d;a++)c[2*a>>>2]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}}})();
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function(){var e=CryptoJS,f=e.lib.WordArray;e.enc.Utf16={stringify:function(b){for(var d=b.words,b=b.sigBytes,c=[],a=0;a<b;a+=2)c.push(String.fromCharCode(d[a>>>2]>>>16-8*(a%4)&65535));return c.join("")},parse:function(b){for(var d=b.length,c=[],a=0;a<d;a++)c[a>>>1]|=b.charCodeAt(a)<<16-16*(a%2);return f.create(c,2*d)}}})();
14 changes: 7 additions & 7 deletions build/components/enc-utf16.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
Expand Down Expand Up @@ -63,7 +63,7 @@
// Convert
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[(i * 2) >>> 2] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
}

return WordArray.create(words, utf16StrLength * 2);
Expand Down
12 changes: 6 additions & 6 deletions build/components/evpkdf-min.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function(){var b=CryptoJS,a=b.lib,f=a.Base,j=a.WordArray,a=b.algo,k=a.EvpKDF=f.extend({cfg:f.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),g=j.create(),f=g.words,h=c.keySize,c=c.iterations;f.length<h;){e&&d.update(e);var e=d.update(a).finalize(b);d.reset();for(var i=1;i<c;i++)e=d.finalize(e),d.reset();g.concat(e)}g.sigBytes=4*h;return g}});b.EvpKDF=function(a,b,c){return k.create(c).compute(a,
b)}})();
12 changes: 6 additions & 6 deletions build/components/evpkdf.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
Expand Down
12 changes: 6 additions & 6 deletions build/components/hmac-min.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function(){var c=CryptoJS,j=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=a.create();"string"==typeof b&&(b=j.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,i=g.words,d=0;d<c;d++)h[d]^=1549556828,i[d]^=909522486;f.sigBytes=g.sigBytes=e;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=
this._hasher,a=b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a))}})})();
12 changes: 6 additions & 6 deletions build/components/hmac.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
// Shortcuts
var C = CryptoJS;
Expand Down
12 changes: 6 additions & 6 deletions build/components/md5-min.js

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

12 changes: 6 additions & 6 deletions build/components/md5.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function (Math) {
// Shortcuts
var C = CryptoJS;
Expand Down
12 changes: 6 additions & 6 deletions build/components/mode-cfb-min.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
CryptoJS.mode.CFB=function(){function g(c,b,e,a){var d=this._iv;d?(d=d.slice(0),this._iv=void 0):d=this._prevBlock;a.encryptBlock(d,0);for(a=0;a<e;a++)c[b+a]^=d[a]}var f=CryptoJS.lib.BlockCipherMode.extend();f.Encryptor=f.extend({processBlock:function(c,b){var e=this._cipher,a=e.blockSize;g.call(this,c,b,a,e);this._prevBlock=c.slice(b,b+a)}});f.Decryptor=f.extend({processBlock:function(c,b){var e=this._cipher,a=e.blockSize,d=c.slice(b,b+a);g.call(this,c,b,a,e);this._prevBlock=d}});return f}();
12 changes: 6 additions & 6 deletions build/components/mode-cfb.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/**
* Cipher Feedback block mode.
*/
Expand Down
12 changes: 6 additions & 6 deletions build/components/mode-ctr-min.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
CryptoJS.mode.CTR=function(){var b=CryptoJS.lib.BlockCipherMode.extend(),g=b.Encryptor=b.extend({processBlock:function(b,f){var a=this._cipher,e=a.blockSize,c=this._iv,d=this._counter;c&&(d=this._counter=c.slice(0),this._iv=void 0);c=d.slice(0);a.encryptBlock(c,0);d[e-1]=d[e-1]+1|0;for(a=0;a<e;a++)b[f+a]^=c[a]}});b.Decryptor=g;return b}();
12 changes: 6 additions & 6 deletions build/components/mode-ctr.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* CryptoJS v3.0 beta 1
* code.google.com/p/crypto-js
* (c) 2009-2012 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
*/
/*
CryptoJS v3.0
code.google.com/p/crypto-js
(c) 2009-2012 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/**
* Counter block mode.
*/
Expand Down
Loading

0 comments on commit de9c46d

Please sign in to comment.