working on it ...

Filters

Explore Public Snippets

Sort by

Found 56 snippets matching: crypto-js

    public by micurs  39023  458  10  8

    Using crypto-js in node.js with Typescript

    You can easily install the crypto-js library in node by using the command (on Mac): npm install crypto-js After that you need to download its type definition from Git/DefinitelyTyped: https://github.com/borisyankov/DefinitelyTyped/tree/master/cryptojs To make it work, however you need to add the following to the cryptojs.d.ts:
    // add this at the end of crypto.d.ts
      declare module "crypto-js" {
        export = CryptoJS;
      }
    
    // Then you can use the module in typescript
    
    ///<reference path='../types/node.d.ts'/>
    ///<reference path='../types/cryptojs.d.ts'/>
    
    import crypto = require("crypto-js");  
    
    function writeln( msg: string ) {
      process.stdout.write( msg +'\n');
    }
    
    var message : string = "Hello Encrypted World!";
    var cmessage : string = crypto.HmacSHA1( message , "1234").toString();
    writeln( message );
    writeln( cmessage );
    

    external by alejandrolechuga  57  0  1  0

    Get Authentication header with OAuth using oauth-1.0a and crypto-js

    Get Authentication header with OAuth using oauth-1.0a and crypto-js: oauth.js
    import OAuth from 'oauth-1.0a';
    import CryptoJS from 'crypto-js';
    
    /**
     * oAuthHeader - Get Authentication header with OAuth.
     *
     * @param  {string} url    Request URL
     * @param  {string} method HTTP method.
     * @return {object}        Authentication header object
     */
    function oAuthHeader(url, method, session, token) {
      
      if (!session || !token) {
        throw new Error('Traying to generate OAuth headers without valid access token or session.');
      }
    
      let oauthObject = new OAuth({
          consumer: {
              key: session,
              secret: token
          },
          signature_method: 'HMAC-SHA1',
          nonce_length: 6,
          version: '1.0',
          hash_function: function(base_string, key) {
            return CryptoJS.HmacSHA1(base_string, key).toString(CryptoJS.enc.Base64);
          }
      });
    
      return oauthObject.toHeader(oauthObject.authorize({url: url, method: method}));
    }
    
    

    external by cynecx  22  0  1  0

    crypto-js

    crypto-js: crypto-js.js
    ;(function (root, factory) {
    	if (typeof exports === "object") {
    		// CommonJS
    		module.exports = exports = factory();
    	}
    	else if (typeof define === "function" && define.amd) {
    		// AMD
    		define([], factory);
    	}
    	else {
    		// Global (browser)
    		root.CryptoJS = factory();
    	}
    }(this, function () {
    
    	/**
    	 * CryptoJS core components.
    	 */
    	var CryptoJS = CryptoJS || (function (Math, undefined) {
    	    /*
    	     * Local polyfil of Object.create
    	     */
    	    var create = Object.create || (function () {
    	        function F() {};
    
    	        return function (obj) {
    	            var subtype;
    
    	            F.prototype = obj;
    
    	            subtype = new F();
    
    	            F.prototype = null;
    
    	            return subtype;
    	        };
    	    }())
    
    	    /**
    	     * CryptoJS namespace.
    	     */
    	    var C = {};
    
    	    /**
    	     * Library namespace.
    	     */
    	    var C_lib = C.lib = {};
    
    	    /**
    	     * Base object for prototypal inheritance.
    	     */
    	    var Base = C_lib.Base = (function () {
    
    
    	        return {
    	            /**
    	             * Creates a new object that inherits from this object.
    	             *
    	             * @param {Object} overrides Properties to copy into the new object.
    	             *
    	             * @return {Object} The new object.
    	             *
    	             * @static
    	             *
    	             * @example
    	             *
    	             *     var MyType = CryptoJS.lib.Base.extend({
    	             *         field: 'value',
    	             *
    	             *         method: function () {
    	             *         }
    	             *     });
    	             */
    	            extend: function (overrides) {
    	                // Spawn
    	                var subtype = create(this);
    
    	                // Augment
    	                if (overrides) {
    	                    subtype.mixIn(overrides);
    	                }
    
    	                // Create default initializer
    	                if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
    	                    subtype.init = function () {
    	                        subtype.$super.init.apply(this, arguments);
    	                    };
    	                }
    
    	                // Initializer's prototype is the subtype object
    	                subtype.init.prototype = subtype;
    
    	                // Reference supertype
    	                subtype.$super = this;
    
    	                return subtype;
    	            },
    
    	            /**
    	             * Extends this object and runs the init method.
    	             * Arguments to create() will be passed to init().
    	             *
    	             * @return {Object} The new object.
    	             *
    	             * @static
    	             *
    	             * @example
    	             *
    	             *     var instance = MyType.create();
    	             */
    	            create: function () {
    	                var instance = this.extend();
    	                instance.init.apply(instance, arguments);
    
    	                return instance;
    	            },
    
    	            /**
    	             * Initializes a newly created object.
    	             * Override this method to add some logic when your objects are created.
    	             *
    	             * @example
    	             *
    	             *     var MyType = CryptoJS.lib.Base.extend({
    	             *         init: function () {
    	             *             // ...
    	             *         }
    	             *     });
    	             */
    	            init: function () {
    	            },
    
    	            /**
    	             * Copies properties into this object.
    	             *
    	             * @param {Object} properties The properties to mix in.
    	             *
    	             * @example
    	             *
    	             *     MyType.mixIn({
    	             *         field: 'value'
    	             *     });
    	             */
    	            mixIn: function (properties) {
    	                for (var propertyName in properties) {
    	                    if (properties.hasOwnProperty(propertyName)) {
    	                        this[propertyName] = properties[propertyName];
    	                    }
    	                }
    
    	                // IE won't copy toString using the loop above
    	                if (properties.hasOwnProperty('toString')) {
    	                    this.toString = properties.toString;
    	                }
    	            },
    
    	            /**
    	             * Creates a copy of this object.
    	             *
    	             * @return {Object} The clone.
    	             *
    	             * @example
    	             *
    	             *     var clone = instance.clone();
    	             */
    	            clone: function () {
    	                return this.init.prototype.extend(this);
    	            }
    	        };
    	    }());
    
    	    /**
    	     * An array of 32-bit words.
    	     *
    	     * @property {Array} words The array of 32-bit words.
    	     * @property {number} sigBytes The number of significant bytes in this word array.
    	     */
    	    var WordArray = C_lib.WordArray = Base.extend({
    	        /**
    	         * Initializes a newly created word array.
    	         *
    	         * @param {Array} words (Optional) An array of 32-bit words.
    	         * @param {number} sigBytes (Optional) The number of significant bytes in the words.
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.lib.WordArray.create();
    	         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
    	         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
    	         */
    	        init: function (words, sigBytes) {
    	            words = this.words = words || [];
    
    	            if (sigBytes != undefined) {
    	                this.sigBytes = sigBytes;
    	            } else {
    	                this.sigBytes = words.length * 4;
    	            }
    	        },
    
    	        /**
    	         * Converts this word array to a string.
    	         *
    	         * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
    	         *
    	         * @return {string} The stringified word array.
    	         *
    	         * @example
    	         *
    	         *     var string = wordArray + '';
    	         *     var string = wordArray.toString();
    	         *     var string = wordArray.toString(CryptoJS.enc.Utf8);
    	         */
    	        toString: function (encoder) {
    	            return (encoder || Hex).stringify(this);
    	        },
    
    	        /**
    	         * Concatenates a word array to this word array.
    	         *
    	         * @param {WordArray} wordArray The word array to append.
    	         *
    	         * @return {WordArray} This word array.
    	         *
    	         * @example
    	         *
    	         *     wordArray1.concat(wordArray2);
    	         */
    	        concat: function (wordArray) {
    	            // Shortcuts
    	            var thisWords = this.words;
    	            var thatWords = wordArray.words;
    	            var thisSigBytes = this.sigBytes;
    	            var thatSigBytes = wordArray.sigBytes;
    
    	            // Clamp excess bits
    	            this.clamp();
    
    	            // Concat
    	            if (thisSigBytes % 4) {
    	                // Copy one byte at a time
    	                for (var i = 0; i < thatSigBytes; i++) {
    	                    var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
    	                    thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
    	                }
    	            } else {
    	                // Copy one word at a time
    	                for (var i = 0; i < thatSigBytes; i += 4) {
    	                    thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
    	                }
    	            }
    	            this.sigBytes += thatSigBytes;
    
    	            // Chainable
    	            return this;
    	        },
    
    	        /**
    	         * Removes insignificant bits.
    	         *
    	         * @example
    	         *
    	         *     wordArray.clamp();
    	         */
    	        clamp: function () {
    	            // Shortcuts
    	            var words = this.words;
    	            var sigBytes = this.sigBytes;
    
    	            // Clamp
    	            words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
    	            words.length = Math.ceil(sigBytes / 4);
    	        },
    
    	        /**
    	         * Creates a copy of this word array.
    	         *
    	         * @return {WordArray} The clone.
    	         *
    	         * @example
    	         *
    	         *     var clone = wordArray.clone();
    	         */
    	        clone: function () {
    	            var clone = Base.clone.call(this);
    	            clone.words = this.words.slice(0);
    
    	            return clone;
    	        },
    
    	        /**
    	         * Creates a word array filled with random bytes.
    	         *
    	         * @param {number} nBytes The number of random bytes to generate.
    	         *
    	         * @return {WordArray} The random word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.lib.WordArray.random(16);
    	         */
    	        random: function (nBytes) {
    	            var words = [];
    
    	            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);
    	        }
    	    });
    
    	    /**
    	     * Encoder namespace.
    	     */
    	    var C_enc = C.enc = {};
    
    	    /**
    	     * Hex encoding strategy.
    	     */
    	    var Hex = C_enc.Hex = {
    	        /**
    	         * Converts a word array to a hex string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The hex string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var hexString = CryptoJS.enc.Hex.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            // Shortcuts
    	            var words = wordArray.words;
    	            var sigBytes = wordArray.sigBytes;
    
    	            // Convert
    	            var hexChars = [];
    	            for (var i = 0; i < sigBytes; i++) {
    	                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
    	                hexChars.push((bite >>> 4).toString(16));
    	                hexChars.push((bite & 0x0f).toString(16));
    	            }
    
    	            return hexChars.join('');
    	        },
    
    	        /**
    	         * Converts a hex string to a word array.
    	         *
    	         * @param {string} hexStr The hex string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Hex.parse(hexString);
    	         */
    	        parse: function (hexStr) {
    	            // Shortcut
    	            var hexStrLength = hexStr.length;
    
    	            // Convert
    	            var words = [];
    	            for (var i = 0; i < hexStrLength; i += 2) {
    	                words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
    	            }
    
    	            return new WordArray.init(words, hexStrLength / 2);
    	        }
    	    };
    
    	    /**
    	     * Latin1 encoding strategy.
    	     */
    	    var Latin1 = C_enc.Latin1 = {
    	        /**
    	         * Converts a word array to a Latin1 string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The Latin1 string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            // Shortcuts
    	            var words = wordArray.words;
    	            var sigBytes = wordArray.sigBytes;
    
    	            // Convert
    	            var latin1Chars = [];
    	            for (var i = 0; i < sigBytes; i++) {
    	                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
    	                latin1Chars.push(String.fromCharCode(bite));
    	            }
    
    	            return latin1Chars.join('');
    	        },
    
    	        /**
    	         * Converts a Latin1 string to a word array.
    	         *
    	         * @param {string} latin1Str The Latin1 string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
    	         */
    	        parse: function (latin1Str) {
    	            // Shortcut
    	            var latin1StrLength = latin1Str.length;
    
    	            // Convert
    	            var words = [];
    	            for (var i = 0; i < latin1StrLength; i++) {
    	                words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
    	            }
    
    	            return new WordArray.init(words, latin1StrLength);
    	        }
    	    };
    
    	    /**
    	     * UTF-8 encoding strategy.
    	     */
    	    var Utf8 = C_enc.Utf8 = {
    	        /**
    	         * Converts a word array to a UTF-8 string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The UTF-8 string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            try {
    	                return decodeURIComponent(escape(Latin1.stringify(wordArray)));
    	            } catch (e) {
    	                throw new Error('Malformed UTF-8 data');
    	            }
    	        },
    
    	        /**
    	         * Converts a UTF-8 string to a word array.
    	         *
    	         * @param {string} utf8Str The UTF-8 string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
    	         */
    	        parse: function (utf8Str) {
    	            return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
    	        }
    	    };
    
    	    /**
    	     * 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
    	     */
    	    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
    	        /**
    	         * Resets this block algorithm's data buffer to its initial state.
    	         *
    	         * @example
    	         *
    	         *     bufferedBlockAlgorithm.reset();
    	         */
    	        reset: function () {
    	            // Initial values
    	            this._data = new WordArray.init();
    	            this._nDataBytes = 0;
    	        },
    
    	        /**
    	         * Adds new data to this block algorithm's buffer.
    	         *
    	         * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
    	         *
    	         * @example
    	         *
    	         *     bufferedBlockAlgorithm._append('data');
    	         *     bufferedBlockAlgorithm._append(wordArray);
    	         */
    	        _append: function (data) {
    	            // Convert string to WordArray, else assume WordArray already
    	            if (typeof data == 'string') {
    	                data = Utf8.parse(data);
    	            }
    
    	            // Append
    	            this._data.concat(data);
    	            this._nDataBytes += data.sigBytes;
    	        },
    
    	        /**
    	         * Processes available data blocks.
    	         *
    	         * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
    	         *
    	         * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
    	         *
    	         * @return {WordArray} The processed data.
    	         *
    	         * @example
    	         *
    	         *     var processedData = bufferedBlockAlgorithm._process();
    	         *     var processedData = bufferedBlockAlgorithm._process(!!'flush');
    	         */
    	        _process: function (doFlush) {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    	            var dataSigBytes = data.sigBytes;
    	            var blockSize = this.blockSize;
    	            var blockSizeBytes = blockSize * 4;
    
    	            // Count blocks ready
    	            var nBlocksReady = dataSigBytes / blockSizeBytes;
    	            if (doFlush) {
    	                // Round up to include partial blocks
    	                nBlocksReady = Math.ceil(nBlocksReady);
    	            } else {
    	                // Round down to include only full blocks,
    	                // less the number of blocks that must remain in the buffer
    	                nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
    	            }
    
    	            // Count words ready
    	            var nWordsReady = nBlocksReady * blockSize;
    
    	            // Count bytes ready
    	            var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
    
    	            // Process blocks
    	            if (nWordsReady) {
    	                for (var offset = 0; offset < nWordsReady; offset += blockSize) {
    	                    // Perform concrete-algorithm logic
    	                    this._doProcessBlock(dataWords, offset);
    	                }
    
    	                // Remove processed words
    	                var processedWords = dataWords.splice(0, nWordsReady);
    	                data.sigBytes -= nBytesReady;
    	            }
    
    	            // Return processed words
    	            return new WordArray.init(processedWords, nBytesReady);
    	        },
    
    	        /**
    	         * Creates a copy of this object.
    	         *
    	         * @return {Object} The clone.
    	         *
    	         * @example
    	         *
    	         *     var clone = bufferedBlockAlgorithm.clone();
    	         */
    	        clone: function () {
    	            var clone = Base.clone.call(this);
    	            clone._data = this._data.clone();
    
    	            return clone;
    	        },
    
    	        _minBufferSize: 0
    	    });
    
    	    /**
    	     * Abstract hasher template.
    	     *
    	     * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
    	     */
    	    var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
    	        /**
    	         * Configuration options.
    	         */
    	        cfg: Base.extend(),
    
    	        /**
    	         * Initializes a newly created hasher.
    	         *
    	         * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
    	         *
    	         * @example
    	         *
    	         *     var hasher = CryptoJS.algo.SHA256.create();
    	         */
    	        init: function (cfg) {
    	            // Apply config defaults
    	            this.cfg = this.cfg.extend(cfg);
    
    	            // Set initial values
    	            this.reset();
    	        },
    
    	        /**
    	         * Resets this hasher to its initial state.
    	         *
    	         * @example
    	         *
    	         *     hasher.reset();
    	         */
    	        reset: function () {
    	            // Reset data buffer
    	            BufferedBlockAlgorithm.reset.call(this);
    
    	            // Perform concrete-hasher logic
    	            this._doReset();
    	        },
    
    	        /**
    	         * Updates this hasher with a message.
    	         *
    	         * @param {WordArray|string} messageUpdate The message to append.
    	         *
    	         * @return {Hasher} This hasher.
    	         *
    	         * @example
    	         *
    	         *     hasher.update('message');
    	         *     hasher.update(wordArray);
    	         */
    	        update: function (messageUpdate) {
    	            // Append
    	            this._append(messageUpdate);
    
    	            // Update the hash
    	            this._process();
    
    	            // Chainable
    	            return this;
    	        },
    
    	        /**
    	         * Finalizes the hash computation.
    	         * Note that the finalize operation is effectively a destructive, read-once operation.
    	         *
    	         * @param {WordArray|string} messageUpdate (Optional) A final message update.
    	         *
    	         * @return {WordArray} The hash.
    	         *
    	         * @example
    	         *
    	         *     var hash = hasher.finalize();
    	         *     var hash = hasher.finalize('message');
    	         *     var hash = hasher.finalize(wordArray);
    	         */
    	        finalize: function (messageUpdate) {
    	            // Final message update
    	            if (messageUpdate) {
    	                this._append(messageUpdate);
    	            }
    
    	            // Perform concrete-hasher logic
    	            var hash = this._doFinalize();
    
    	            return hash;
    	        },
    
    	        blockSize: 512/32,
    
    	        /**
    	         * Creates a shortcut function to a hasher's object interface.
    	         *
    	         * @param {Hasher} hasher The hasher to create a helper for.
    	         *
    	         * @return {Function} The shortcut function.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
    	         */
    	        _createHelper: function (hasher) {
    	            return function (message, cfg) {
    	                return new hasher.init(cfg).finalize(message);
    	            };
    	        },
    
    	        /**
    	         * Creates a shortcut function to the HMAC's object interface.
    	         *
    	         * @param {Hasher} hasher The hasher to use in this HMAC helper.
    	         *
    	         * @return {Function} The shortcut function.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
    	         */
    	        _createHmacHelper: function (hasher) {
    	            return function (message, key) {
    	                return new C_algo.HMAC.init(hasher, key).finalize(message);
    	            };
    	        }
    	    });
    
    	    /**
    	     * Algorithm namespace.
    	     */
    	    var C_algo = C.algo = {};
    
    	    return C;
    	}(Math));
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var C_enc = C.enc;
    
    	    /**
    	     * Base64 encoding strategy.
    	     */
    	    var Base64 = C_enc.Base64 = {
    	        /**
    	         * Converts a word array to a Base64 string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The Base64 string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var base64String = CryptoJS.enc.Base64.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            // Shortcuts
    	            var words = wordArray.words;
    	            var sigBytes = wordArray.sigBytes;
    	            var map = this._map;
    
    	            // Clamp excess bits
    	            wordArray.clamp();
    
    	            // Convert
    	            var base64Chars = [];
    	            for (var i = 0; i < sigBytes; i += 3) {
    	                var byte1 = (words[i >>> 2]       >>> (24 - (i % 4) * 8))       & 0xff;
    	                var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
    	                var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
    
    	                var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
    
    	                for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
    	                    base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
    	                }
    	            }
    
    	            // Add padding
    	            var paddingChar = map.charAt(64);
    	            if (paddingChar) {
    	                while (base64Chars.length % 4) {
    	                    base64Chars.push(paddingChar);
    	                }
    	            }
    
    	            return base64Chars.join('');
    	        },
    
    	        /**
    	         * Converts a Base64 string to a word array.
    	         *
    	         * @param {string} base64Str The Base64 string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Base64.parse(base64String);
    	         */
    	        parse: function (base64Str) {
    	            // Shortcuts
    	            var base64StrLength = base64Str.length;
    	            var map = this._map;
    	            var reverseMap = this._reverseMap;
    
    	            if (!reverseMap) {
    	                    reverseMap = this._reverseMap = [];
    	                    for (var j = 0; j < map.length; j++) {
    	                        reverseMap[map.charCodeAt(j)] = j;
    	                    }
    	            }
    
    	            // Ignore padding
    	            var paddingChar = map.charAt(64);
    	            if (paddingChar) {
    	                var paddingIndex = base64Str.indexOf(paddingChar);
    	                if (paddingIndex !== -1) {
    	                    base64StrLength = paddingIndex;
    	                }
    	            }
    
    	            // Convert
    	            return parseLoop(base64Str, base64StrLength, reverseMap);
    
    	        },
    
    	        _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
    	    };
    
    	    function parseLoop(base64Str, base64StrLength, reverseMap) {
    	      var words = [];
    	      var nBytes = 0;
    	      for (var i = 0; i < base64StrLength; i++) {
    	          if (i % 4) {
    	              var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
    	              var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
    	              words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);
    	              nBytes++;
    	          }
    	      }
    	      return WordArray.create(words, nBytes);
    	    }
    	}());
    
    
    	(function (Math) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var Hasher = C_lib.Hasher;
    	    var C_algo = C.algo;
    
    	    // Constants table
    	    var T = [];
    
    	    // Compute constants
    	    (function () {
    	        for (var i = 0; i < 64; i++) {
    	            T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
    	        }
    	    }());
    
    	    /**
    	     * MD5 hash algorithm.
    	     */
    	    var MD5 = C_algo.MD5 = Hasher.extend({
    	        _doReset: function () {
    	            this._hash = new WordArray.init([
    	                0x67452301, 0xefcdab89,
    	                0x98badcfe, 0x10325476
    	            ]);
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Swap endian
    	            for (var i = 0; i < 16; i++) {
    	                // Shortcuts
    	                var offset_i = offset + i;
    	                var M_offset_i = M[offset_i];
    
    	                M[offset_i] = (
    	                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |
    	                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)
    	                );
    	            }
    
    	            // Shortcuts
    	            var H = this._hash.words;
    
    	            var M_offset_0  = M[offset + 0];
    	            var M_offset_1  = M[offset + 1];
    	            var M_offset_2  = M[offset + 2];
    	            var M_offset_3  = M[offset + 3];
    	            var M_offset_4  = M[offset + 4];
    	            var M_offset_5  = M[offset + 5];
    	            var M_offset_6  = M[offset + 6];
    	            var M_offset_7  = M[offset + 7];
    	            var M_offset_8  = M[offset + 8];
    	            var M_offset_9  = M[offset + 9];
    	            var M_offset_10 = M[offset + 10];
    	            var M_offset_11 = M[offset + 11];
    	            var M_offset_12 = M[offset + 12];
    	            var M_offset_13 = M[offset + 13];
    	            var M_offset_14 = M[offset + 14];
    	            var M_offset_15 = M[offset + 15];
    
    	            // Working varialbes
    	            var a = H[0];
    	            var b = H[1];
    	            var c = H[2];
    	            var d = H[3];
    
    	            // Computation
    	            a = FF(a, b, c, d, M_offset_0,  7,  T[0]);
    	            d = FF(d, a, b, c, M_offset_1,  12, T[1]);
    	            c = FF(c, d, a, b, M_offset_2,  17, T[2]);
    	            b = FF(b, c, d, a, M_offset_3,  22, T[3]);
    	            a = FF(a, b, c, d, M_offset_4,  7,  T[4]);
    	            d = FF(d, a, b, c, M_offset_5,  12, T[5]);
    	            c = FF(c, d, a, b, M_offset_6,  17, T[6]);
    	            b = FF(b, c, d, a, M_offset_7,  22, T[7]);
    	            a = FF(a, b, c, d, M_offset_8,  7,  T[8]);
    	            d = FF(d, a, b, c, M_offset_9,  12, T[9]);
    	            c = FF(c, d, a, b, M_offset_10, 17, T[10]);
    	            b = FF(b, c, d, a, M_offset_11, 22, T[11]);
    	            a = FF(a, b, c, d, M_offset_12, 7,  T[12]);
    	            d = FF(d, a, b, c, M_offset_13, 12, T[13]);
    	            c = FF(c, d, a, b, M_offset_14, 17, T[14]);
    	            b = FF(b, c, d, a, M_offset_15, 22, T[15]);
    
    	            a = GG(a, b, c, d, M_offset_1,  5,  T[16]);
    	            d = GG(d, a, b, c, M_offset_6,  9,  T[17]);
    	            c = GG(c, d, a, b, M_offset_11, 14, T[18]);
    	            b = GG(b, c, d, a, M_offset_0,  20, T[19]);
    	            a = GG(a, b, c, d, M_offset_5,  5,  T[20]);
    	            d = GG(d, a, b, c, M_offset_10, 9,  T[21]);
    	            c = GG(c, d, a, b, M_offset_15, 14, T[22]);
    	            b = GG(b, c, d, a, M_offset_4,  20, T[23]);
    	            a = GG(a, b, c, d, M_offset_9,  5,  T[24]);
    	            d = GG(d, a, b, c, M_offset_14, 9,  T[25]);
    	            c = GG(c, d, a, b, M_offset_3,  14, T[26]);
    	            b = GG(b, c, d, a, M_offset_8,  20, T[27]);
    	            a = GG(a, b, c, d, M_offset_13, 5,  T[28]);
    	            d = GG(d, a, b, c, M_offset_2,  9,  T[29]);
    	            c = GG(c, d, a, b, M_offset_7,  14, T[30]);
    	            b = GG(b, c, d, a, M_offset_12, 20, T[31]);
    
    	            a = HH(a, b, c, d, M_offset_5,  4,  T[32]);
    	            d = HH(d, a, b, c, M_offset_8,  11, T[33]);
    	            c = HH(c, d, a, b, M_offset_11, 16, T[34]);
    	            b = HH(b, c, d, a, M_offset_14, 23, T[35]);
    	            a = HH(a, b, c, d, M_offset_1,  4,  T[36]);
    	            d = HH(d, a, b, c, M_offset_4,  11, T[37]);
    	            c = HH(c, d, a, b, M_offset_7,  16, T[38]);
    	            b = HH(b, c, d, a, M_offset_10, 23, T[39]);
    	            a = HH(a, b, c, d, M_offset_13, 4,  T[40]);
    	            d = HH(d, a, b, c, M_offset_0,  11, T[41]);
    	            c = HH(c, d, a, b, M_offset_3,  16, T[42]);
    	            b = HH(b, c, d, a, M_offset_6,  23, T[43]);
    	            a = HH(a, b, c, d, M_offset_9,  4,  T[44]);
    	            d = HH(d, a, b, c, M_offset_12, 11, T[45]);
    	            c = HH(c, d, a, b, M_offset_15, 16, T[46]);
    	            b = HH(b, c, d, a, M_offset_2,  23, T[47]);
    
    	            a = II(a, b, c, d, M_offset_0,  6,  T[48]);
    	            d = II(d, a, b, c, M_offset_7,  10, T[49]);
    	            c = II(c, d, a, b, M_offset_14, 15, T[50]);
    	            b = II(b, c, d, a, M_offset_5,  21, T[51]);
    	            a = II(a, b, c, d, M_offset_12, 6,  T[52]);
    	            d = II(d, a, b, c, M_offset_3,  10, T[53]);
    	            c = II(c, d, a, b, M_offset_10, 15, T[54]);
    	            b = II(b, c, d, a, M_offset_1,  21, T[55]);
    	            a = II(a, b, c, d, M_offset_8,  6,  T[56]);
    	            d = II(d, a, b, c, M_offset_15, 10, T[57]);
    	            c = II(c, d, a, b, M_offset_6,  15, T[58]);
    	            b = II(b, c, d, a, M_offset_13, 21, T[59]);
    	            a = II(a, b, c, d, M_offset_4,  6,  T[60]);
    	            d = II(d, a, b, c, M_offset_11, 10, T[61]);
    	            c = II(c, d, a, b, M_offset_2,  15, T[62]);
    	            b = II(b, c, d, a, M_offset_9,  21, T[63]);
    
    	            // Intermediate hash value
    	            H[0] = (H[0] + a) | 0;
    	            H[1] = (H[1] + b) | 0;
    	            H[2] = (H[2] + c) | 0;
    	            H[3] = (H[3] + d) | 0;
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
    
    	            var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
    	            var nBitsTotalL = nBitsTotal;
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
    	                (((nBitsTotalH << 8)  | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
    	                (((nBitsTotalH << 24) | (nBitsTotalH >>> 8))  & 0xff00ff00)
    	            );
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
    	                (((nBitsTotalL << 8)  | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
    	                (((nBitsTotalL << 24) | (nBitsTotalL >>> 8))  & 0xff00ff00)
    	            );
    
    	            data.sigBytes = (dataWords.length + 1) * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Shortcuts
    	            var hash = this._hash;
    	            var H = hash.words;
    
    	            // Swap endian
    	            for (var i = 0; i < 4; i++) {
    	                // Shortcut
    	                var H_i = H[i];
    
    	                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |
    	                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);
    	            }
    
    	            // Return final computed hash
    	            return hash;
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    	            clone._hash = this._hash.clone();
    
    	            return clone;
    	        }
    	    });
    
    	    function FF(a, b, c, d, x, s, t) {
    	        var n = a + ((b & c) | (~b & d)) + x + t;
    	        return ((n << s) | (n >>> (32 - s))) + b;
    	    }
    
    	    function GG(a, b, c, d, x, s, t) {
    	        var n = a + ((b & d) | (c & ~d)) + x + t;
    	        return ((n << s) | (n >>> (32 - s))) + b;
    	    }
    
    	    function HH(a, b, c, d, x, s, t) {
    	        var n = a + (b ^ c ^ d) + x + t;
    	        return ((n << s) | (n >>> (32 - s))) + b;
    	    }
    
    	    function II(a, b, c, d, x, s, t) {
    	        var n = a + (c ^ (b | ~d)) + x + t;
    	        return ((n << s) | (n >>> (32 - s))) + b;
    	    }
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.MD5('message');
    	     *     var hash = CryptoJS.MD5(wordArray);
    	     */
    	    C.MD5 = Hasher._createHelper(MD5);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacMD5(message, key);
    	     */
    	    C.HmacMD5 = Hasher._createHmacHelper(MD5);
    	}(Math));
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var Hasher = C_lib.Hasher;
    	    var C_algo = C.algo;
    
    	    // Reusable object
    	    var W = [];
    
    	    /**
    	     * SHA-1 hash algorithm.
    	     */
    	    var SHA1 = C_algo.SHA1 = Hasher.extend({
    	        _doReset: function () {
    	            this._hash = new WordArray.init([
    	                0x67452301, 0xefcdab89,
    	                0x98badcfe, 0x10325476,
    	                0xc3d2e1f0
    	            ]);
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcut
    	            var H = this._hash.words;
    
    	            // Working variables
    	            var a = H[0];
    	            var b = H[1];
    	            var c = H[2];
    	            var d = H[3];
    	            var e = H[4];
    
    	            // Computation
    	            for (var i = 0; i < 80; i++) {
    	                if (i < 16) {
    	                    W[i] = M[offset + i] | 0;
    	                } else {
    	                    var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
    	                    W[i] = (n << 1) | (n >>> 31);
    	                }
    
    	                var t = ((a << 5) | (a >>> 27)) + e + W[i];
    	                if (i < 20) {
    	                    t += ((b & c) | (~b & d)) + 0x5a827999;
    	                } else if (i < 40) {
    	                    t += (b ^ c ^ d) + 0x6ed9eba1;
    	                } else if (i < 60) {
    	                    t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
    	                } else /* if (i < 80) */ {
    	                    t += (b ^ c ^ d) - 0x359d3e2a;
    	                }
    
    	                e = d;
    	                d = c;
    	                c = (b << 30) | (b >>> 2);
    	                b = a;
    	                a = t;
    	            }
    
    	            // Intermediate hash value
    	            H[0] = (H[0] + a) | 0;
    	            H[1] = (H[1] + b) | 0;
    	            H[2] = (H[2] + c) | 0;
    	            H[3] = (H[3] + d) | 0;
    	            H[4] = (H[4] + e) | 0;
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
    	            data.sigBytes = dataWords.length * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Return final computed hash
    	            return this._hash;
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    	            clone._hash = this._hash.clone();
    
    	            return clone;
    	        }
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA1('message');
    	     *     var hash = CryptoJS.SHA1(wordArray);
    	     */
    	    C.SHA1 = Hasher._createHelper(SHA1);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA1(message, key);
    	     */
    	    C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
    	}());
    
    
    	(function (Math) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var Hasher = C_lib.Hasher;
    	    var C_algo = C.algo;
    
    	    // Initialization and round constants tables
    	    var H = [];
    	    var K = [];
    
    	    // Compute constants
    	    (function () {
    	        function isPrime(n) {
    	            var sqrtN = Math.sqrt(n);
    	            for (var factor = 2; factor <= sqrtN; factor++) {
    	                if (!(n % factor)) {
    	                    return false;
    	                }
    	            }
    
    	            return true;
    	        }
    
    	        function getFractionalBits(n) {
    	            return ((n - (n | 0)) * 0x100000000) | 0;
    	        }
    
    	        var n = 2;
    	        var nPrime = 0;
    	        while (nPrime < 64) {
    	            if (isPrime(n)) {
    	                if (nPrime < 8) {
    	                    H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
    	                }
    	                K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
    
    	                nPrime++;
    	            }
    
    	            n++;
    	        }
    	    }());
    
    	    // Reusable object
    	    var W = [];
    
    	    /**
    	     * SHA-256 hash algorithm.
    	     */
    	    var SHA256 = C_algo.SHA256 = Hasher.extend({
    	        _doReset: function () {
    	            this._hash = new WordArray.init(H.slice(0));
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcut
    	            var H = this._hash.words;
    
    	            // Working variables
    	            var a = H[0];
    	            var b = H[1];
    	            var c = H[2];
    	            var d = H[3];
    	            var e = H[4];
    	            var f = H[5];
    	            var g = H[6];
    	            var h = H[7];
    
    	            // Computation
    	            for (var i = 0; i < 64; i++) {
    	                if (i < 16) {
    	                    W[i] = M[offset + i] | 0;
    	                } else {
    	                    var gamma0x = W[i - 15];
    	                    var gamma0  = ((gamma0x << 25) | (gamma0x >>> 7))  ^
    	                                  ((gamma0x << 14) | (gamma0x >>> 18)) ^
    	                                   (gamma0x >>> 3);
    
    	                    var gamma1x = W[i - 2];
    	                    var gamma1  = ((gamma1x << 15) | (gamma1x >>> 17)) ^
    	                                  ((gamma1x << 13) | (gamma1x >>> 19)) ^
    	                                   (gamma1x >>> 10);
    
    	                    W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
    	                }
    
    	                var ch  = (e & f) ^ (~e & g);
    	                var maj = (a & b) ^ (a & c) ^ (b & c);
    
    	                var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
    	                var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7)  | (e >>> 25));
    
    	                var t1 = h + sigma1 + ch + K[i] + W[i];
    	                var t2 = sigma0 + maj;
    
    	                h = g;
    	                g = f;
    	                f = e;
    	                e = (d + t1) | 0;
    	                d = c;
    	                c = b;
    	                b = a;
    	                a = (t1 + t2) | 0;
    	            }
    
    	            // Intermediate hash value
    	            H[0] = (H[0] + a) | 0;
    	            H[1] = (H[1] + b) | 0;
    	            H[2] = (H[2] + c) | 0;
    	            H[3] = (H[3] + d) | 0;
    	            H[4] = (H[4] + e) | 0;
    	            H[5] = (H[5] + f) | 0;
    	            H[6] = (H[6] + g) | 0;
    	            H[7] = (H[7] + h) | 0;
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
    	            data.sigBytes = dataWords.length * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Return final computed hash
    	            return this._hash;
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    	            clone._hash = this._hash.clone();
    
    	            return clone;
    	        }
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA256('message');
    	     *     var hash = CryptoJS.SHA256(wordArray);
    	     */
    	    C.SHA256 = Hasher._createHelper(SHA256);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA256(message, key);
    	     */
    	    C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
    	}(Math));
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var C_enc = C.enc;
    
    	    /**
    	     * UTF-16 BE encoding strategy.
    	     */
    	    var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
    	        /**
    	         * Converts a word array to a UTF-16 BE string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The UTF-16 BE string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            // Shortcuts
    	            var words = wordArray.words;
    	            var sigBytes = wordArray.sigBytes;
    
    	            // Convert
    	            var utf16Chars = [];
    	            for (var i = 0; i < sigBytes; i += 2) {
    	                var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
    	                utf16Chars.push(String.fromCharCode(codePoint));
    	            }
    
    	            return utf16Chars.join('');
    	        },
    
    	        /**
    	         * Converts a UTF-16 BE string to a word array.
    	         *
    	         * @param {string} utf16Str The UTF-16 BE string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
    	         */
    	        parse: function (utf16Str) {
    	            // Shortcut
    	            var utf16StrLength = utf16Str.length;
    
    	            // Convert
    	            var words = [];
    	            for (var i = 0; i < utf16StrLength; i++) {
    	                words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
    	            }
    
    	            return WordArray.create(words, utf16StrLength * 2);
    	        }
    	    };
    
    	    /**
    	     * UTF-16 LE encoding strategy.
    	     */
    	    C_enc.Utf16LE = {
    	        /**
    	         * Converts a word array to a UTF-16 LE string.
    	         *
    	         * @param {WordArray} wordArray The word array.
    	         *
    	         * @return {string} The UTF-16 LE string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
    	         */
    	        stringify: function (wordArray) {
    	            // Shortcuts
    	            var words = wordArray.words;
    	            var sigBytes = wordArray.sigBytes;
    
    	            // Convert
    	            var utf16Chars = [];
    	            for (var i = 0; i < sigBytes; i += 2) {
    	                var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
    	                utf16Chars.push(String.fromCharCode(codePoint));
    	            }
    
    	            return utf16Chars.join('');
    	        },
    
    	        /**
    	         * Converts a UTF-16 LE string to a word array.
    	         *
    	         * @param {string} utf16Str The UTF-16 LE string.
    	         *
    	         * @return {WordArray} The word array.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
    	         */
    	        parse: function (utf16Str) {
    	            // Shortcut
    	            var utf16StrLength = utf16Str.length;
    
    	            // Convert
    	            var words = [];
    	            for (var i = 0; i < utf16StrLength; i++) {
    	                words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
    	            }
    
    	            return WordArray.create(words, utf16StrLength * 2);
    	        }
    	    };
    
    	    function swapEndian(word) {
    	        return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
    	    }
    	}());
    
    
    	(function () {
    	    // Check if typed arrays are supported
    	    if (typeof ArrayBuffer != 'function') {
    	        return;
    	    }
    
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    
    	    // Reference original init
    	    var superInit = WordArray.init;
    
    	    // Augment WordArray.init to handle typed arrays
    	    var subInit = WordArray.init = function (typedArray) {
    	        // Convert buffers to uint8
    	        if (typedArray instanceof ArrayBuffer) {
    	            typedArray = new Uint8Array(typedArray);
    	        }
    
    	        // Convert other array views to uint8
    	        if (
    	            typedArray instanceof Int8Array ||
    	            (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
    	            typedArray instanceof Int16Array ||
    	            typedArray instanceof Uint16Array ||
    	            typedArray instanceof Int32Array ||
    	            typedArray instanceof Uint32Array ||
    	            typedArray instanceof Float32Array ||
    	            typedArray instanceof Float64Array
    	        ) {
    	            typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
    	        }
    
    	        // Handle Uint8Array
    	        if (typedArray instanceof Uint8Array) {
    	            // Shortcut
    	            var typedArrayByteLength = typedArray.byteLength;
    
    	            // Extract bytes
    	            var words = [];
    	            for (var i = 0; i < typedArrayByteLength; i++) {
    	                words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);
    	            }
    
    	            // Initialize this word array
    	            superInit.call(this, words, typedArrayByteLength);
    	        } else {
    	            // Else call normal init
    	            superInit.apply(this, arguments);
    	        }
    	    };
    
    	    subInit.prototype = WordArray;
    	}());
    
    
    	/** @preserve
    	(c) 2012 by Cédric Mesnil. All rights reserved.
    
    	Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    
    	    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    	    - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    
    	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    	*/
    
    	(function (Math) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var Hasher = C_lib.Hasher;
    	    var C_algo = C.algo;
    
    	    // Constants table
    	    var _zl = WordArray.create([
    	        0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
    	        7,  4, 13,  1, 10,  6, 15,  3, 12,  0,  9,  5,  2, 14, 11,  8,
    	        3, 10, 14,  4,  9, 15,  8,  1,  2,  7,  0,  6, 13, 11,  5, 12,
    	        1,  9, 11, 10,  0,  8, 12,  4, 13,  3,  7, 15, 14,  5,  6,  2,
    	        4,  0,  5,  9,  7, 12,  2, 10, 14,  1,  3,  8, 11,  6, 15, 13]);
    	    var _zr = WordArray.create([
    	        5, 14,  7,  0,  9,  2, 11,  4, 13,  6, 15,  8,  1, 10,  3, 12,
    	        6, 11,  3,  7,  0, 13,  5, 10, 14, 15,  8, 12,  4,  9,  1,  2,
    	        15,  5,  1,  3,  7, 14,  6,  9, 11,  8, 12,  2, 10,  0,  4, 13,
    	        8,  6,  4,  1,  3, 11, 15,  0,  5, 12,  2, 13,  9,  7, 10, 14,
    	        12, 15, 10,  4,  1,  5,  8,  7,  6,  2, 13, 14,  0,  3,  9, 11]);
    	    var _sl = WordArray.create([
    	         11, 14, 15, 12,  5,  8,  7,  9, 11, 13, 14, 15,  6,  7,  9,  8,
    	        7, 6,   8, 13, 11,  9,  7, 15,  7, 12, 15,  9, 11,  7, 13, 12,
    	        11, 13,  6,  7, 14,  9, 13, 15, 14,  8, 13,  6,  5, 12,  7,  5,
    	          11, 12, 14, 15, 14, 15,  9,  8,  9, 14,  5,  6,  8,  6,  5, 12,
    	        9, 15,  5, 11,  6,  8, 13, 12,  5, 12, 13, 14, 11,  8,  5,  6 ]);
    	    var _sr = WordArray.create([
    	        8,  9,  9, 11, 13, 15, 15,  5,  7,  7,  8, 11, 14, 14, 12,  6,
    	        9, 13, 15,  7, 12,  8,  9, 11,  7,  7, 12,  7,  6, 15, 13, 11,
    	        9,  7, 15, 11,  8,  6,  6, 14, 12, 13,  5, 14, 13, 13,  7,  5,
    	        15,  5,  8, 11, 14, 14,  6, 14,  6,  9, 12,  9, 12,  5, 15,  8,
    	        8,  5, 12,  9, 12,  5, 14,  6,  8, 13,  6,  5, 15, 13, 11, 11 ]);
    
    	    var _hl =  WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
    	    var _hr =  WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
    
    	    /**
    	     * RIPEMD160 hash algorithm.
    	     */
    	    var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
    	        _doReset: function () {
    	            this._hash  = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    
    	            // Swap endian
    	            for (var i = 0; i < 16; i++) {
    	                // Shortcuts
    	                var offset_i = offset + i;
    	                var M_offset_i = M[offset_i];
    
    	                // Swap
    	                M[offset_i] = (
    	                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |
    	                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)
    	                );
    	            }
    	            // Shortcut
    	            var H  = this._hash.words;
    	            var hl = _hl.words;
    	            var hr = _hr.words;
    	            var zl = _zl.words;
    	            var zr = _zr.words;
    	            var sl = _sl.words;
    	            var sr = _sr.words;
    
    	            // Working variables
    	            var al, bl, cl, dl, el;
    	            var ar, br, cr, dr, er;
    
    	            ar = al = H[0];
    	            br = bl = H[1];
    	            cr = cl = H[2];
    	            dr = dl = H[3];
    	            er = el = H[4];
    	            // Computation
    	            var t;
    	            for (var i = 0; i < 80; i += 1) {
    	                t = (al +  M[offset+zl[i]])|0;
    	                if (i<16){
    		            t +=  f1(bl,cl,dl) + hl[0];
    	                } else if (i<32) {
    		            t +=  f2(bl,cl,dl) + hl[1];
    	                } else if (i<48) {
    		            t +=  f3(bl,cl,dl) + hl[2];
    	                } else if (i<64) {
    		            t +=  f4(bl,cl,dl) + hl[3];
    	                } else {// if (i<80) {
    		            t +=  f5(bl,cl,dl) + hl[4];
    	                }
    	                t = t|0;
    	                t =  rotl(t,sl[i]);
    	                t = (t+el)|0;
    	                al = el;
    	                el = dl;
    	                dl = rotl(cl, 10);
    	                cl = bl;
    	                bl = t;
    
    	                t = (ar + M[offset+zr[i]])|0;
    	                if (i<16){
    		            t +=  f5(br,cr,dr) + hr[0];
    	                } else if (i<32) {
    		            t +=  f4(br,cr,dr) + hr[1];
    	                } else if (i<48) {
    		            t +=  f3(br,cr,dr) + hr[2];
    	                } else if (i<64) {
    		            t +=  f2(br,cr,dr) + hr[3];
    	                } else {// if (i<80) {
    		            t +=  f1(br,cr,dr) + hr[4];
    	                }
    	                t = t|0;
    	                t =  rotl(t,sr[i]) ;
    	                t = (t+er)|0;
    	                ar = er;
    	                er = dr;
    	                dr = rotl(cr, 10);
    	                cr = br;
    	                br = t;
    	            }
    	            // Intermediate hash value
    	            t    = (H[1] + cl + dr)|0;
    	            H[1] = (H[2] + dl + er)|0;
    	            H[2] = (H[3] + el + ar)|0;
    	            H[3] = (H[4] + al + br)|0;
    	            H[4] = (H[0] + bl + cr)|0;
    	            H[0] =  t;
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
    	            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
    	                (((nBitsTotal << 8)  | (nBitsTotal >>> 24)) & 0x00ff00ff) |
    	                (((nBitsTotal << 24) | (nBitsTotal >>> 8))  & 0xff00ff00)
    	            );
    	            data.sigBytes = (dataWords.length + 1) * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Shortcuts
    	            var hash = this._hash;
    	            var H = hash.words;
    
    	            // Swap endian
    	            for (var i = 0; i < 5; i++) {
    	                // Shortcut
    	                var H_i = H[i];
    
    	                // Swap
    	                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |
    	                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);
    	            }
    
    	            // Return final computed hash
    	            return hash;
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    	            clone._hash = this._hash.clone();
    
    	            return clone;
    	        }
    	    });
    
    
    	    function f1(x, y, z) {
    	        return ((x) ^ (y) ^ (z));
    
    	    }
    
    	    function f2(x, y, z) {
    	        return (((x)&(y)) | ((~x)&(z)));
    	    }
    
    	    function f3(x, y, z) {
    	        return (((x) | (~(y))) ^ (z));
    	    }
    
    	    function f4(x, y, z) {
    	        return (((x) & (z)) | ((y)&(~(z))));
    	    }
    
    	    function f5(x, y, z) {
    	        return ((x) ^ ((y) |(~(z))));
    
    	    }
    
    	    function rotl(x,n) {
    	        return (x<<n) | (x>>>(32-n));
    	    }
    
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.RIPEMD160('message');
    	     *     var hash = CryptoJS.RIPEMD160(wordArray);
    	     */
    	    C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacRIPEMD160(message, key);
    	     */
    	    C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
    	}(Math));
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Base = C_lib.Base;
    	    var C_enc = C.enc;
    	    var Utf8 = C_enc.Utf8;
    	    var C_algo = C.algo;
    
    	    /**
    	     * HMAC algorithm.
    	     */
    	    var HMAC = C_algo.HMAC = Base.extend({
    	        /**
    	         * Initializes a newly created HMAC.
    	         *
    	         * @param {Hasher} hasher The hash algorithm to use.
    	         * @param {WordArray|string} key The secret key.
    	         *
    	         * @example
    	         *
    	         *     var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
    	         */
    	        init: function (hasher, key) {
    	            // Init hasher
    	            hasher = this._hasher = new hasher.init();
    
    	            // Convert string to WordArray, else assume WordArray already
    	            if (typeof key == 'string') {
    	                key = Utf8.parse(key);
    	            }
    
    	            // Shortcuts
    	            var hasherBlockSize = hasher.blockSize;
    	            var hasherBlockSizeBytes = hasherBlockSize * 4;
    
    	            // Allow arbitrary length keys
    	            if (key.sigBytes > hasherBlockSizeBytes) {
    	                key = hasher.finalize(key);
    	            }
    
    	            // Clamp excess bits
    	            key.clamp();
    
    	            // Clone key for inner and outer pads
    	            var oKey = this._oKey = key.clone();
    	            var iKey = this._iKey = key.clone();
    
    	            // Shortcuts
    	            var oKeyWords = oKey.words;
    	            var iKeyWords = iKey.words;
    
    	            // XOR keys with pad constants
    	            for (var i = 0; i < hasherBlockSize; i++) {
    	                oKeyWords[i] ^= 0x5c5c5c5c;
    	                iKeyWords[i] ^= 0x36363636;
    	            }
    	            oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
    
    	            // Set initial values
    	            this.reset();
    	        },
    
    	        /**
    	         * Resets this HMAC to its initial state.
    	         *
    	         * @example
    	         *
    	         *     hmacHasher.reset();
    	         */
    	        reset: function () {
    	            // Shortcut
    	            var hasher = this._hasher;
    
    	            // Reset
    	            hasher.reset();
    	            hasher.update(this._iKey);
    	        },
    
    	        /**
    	         * Updates this HMAC with a message.
    	         *
    	         * @param {WordArray|string} messageUpdate The message to append.
    	         *
    	         * @return {HMAC} This HMAC instance.
    	         *
    	         * @example
    	         *
    	         *     hmacHasher.update('message');
    	         *     hmacHasher.update(wordArray);
    	         */
    	        update: function (messageUpdate) {
    	            this._hasher.update(messageUpdate);
    
    	            // Chainable
    	            return this;
    	        },
    
    	        /**
    	         * Finalizes the HMAC computation.
    	         * Note that the finalize operation is effectively a destructive, read-once operation.
    	         *
    	         * @param {WordArray|string} messageUpdate (Optional) A final message update.
    	         *
    	         * @return {WordArray} The HMAC.
    	         *
    	         * @example
    	         *
    	         *     var hmac = hmacHasher.finalize();
    	         *     var hmac = hmacHasher.finalize('message');
    	         *     var hmac = hmacHasher.finalize(wordArray);
    	         */
    	        finalize: function (messageUpdate) {
    	            // Shortcut
    	            var hasher = this._hasher;
    
    	            // Compute HMAC
    	            var innerHash = hasher.finalize(messageUpdate);
    	            hasher.reset();
    	            var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
    
    	            return hmac;
    	        }
    	    });
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Base = C_lib.Base;
    	    var WordArray = C_lib.WordArray;
    	    var C_algo = C.algo;
    	    var SHA1 = C_algo.SHA1;
    	    var HMAC = C_algo.HMAC;
    
    	    /**
    	     * Password-Based Key Derivation Function 2 algorithm.
    	     */
    	    var PBKDF2 = C_algo.PBKDF2 = Base.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
    	         * @property {Hasher} hasher The hasher to use. Default: SHA1
    	         * @property {number} iterations The number of iterations to perform. Default: 1
    	         */
    	        cfg: Base.extend({
    	            keySize: 128/32,
    	            hasher: SHA1,
    	            iterations: 1
    	        }),
    
    	        /**
    	         * Initializes a newly created key derivation function.
    	         *
    	         * @param {Object} cfg (Optional) The configuration options to use for the derivation.
    	         *
    	         * @example
    	         *
    	         *     var kdf = CryptoJS.algo.PBKDF2.create();
    	         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
    	         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
    	         */
    	        init: function (cfg) {
    	            this.cfg = this.cfg.extend(cfg);
    	        },
    
    	        /**
    	         * Computes the Password-Based Key Derivation Function 2.
    	         *
    	         * @param {WordArray|string} password The password.
    	         * @param {WordArray|string} salt A salt.
    	         *
    	         * @return {WordArray} The derived key.
    	         *
    	         * @example
    	         *
    	         *     var key = kdf.compute(password, salt);
    	         */
    	        compute: function (password, salt) {
    	            // Shortcut
    	            var cfg = this.cfg;
    
    	            // Init HMAC
    	            var hmac = HMAC.create(cfg.hasher, password);
    
    	            // Initial values
    	            var derivedKey = WordArray.create();
    	            var blockIndex = WordArray.create([0x00000001]);
    
    	            // Shortcuts
    	            var derivedKeyWords = derivedKey.words;
    	            var blockIndexWords = blockIndex.words;
    	            var keySize = cfg.keySize;
    	            var iterations = cfg.iterations;
    
    	            // Generate key
    	            while (derivedKeyWords.length < keySize) {
    	                var block = hmac.update(salt).finalize(blockIndex);
    	                hmac.reset();
    
    	                // Shortcuts
    	                var blockWords = block.words;
    	                var blockWordsLength = blockWords.length;
    
    	                // Iterations
    	                var intermediate = block;
    	                for (var i = 1; i < iterations; i++) {
    	                    intermediate = hmac.finalize(intermediate);
    	                    hmac.reset();
    
    	                    // Shortcut
    	                    var intermediateWords = intermediate.words;
    
    	                    // XOR intermediate with block
    	                    for (var j = 0; j < blockWordsLength; j++) {
    	                        blockWords[j] ^= intermediateWords[j];
    	                    }
    	                }
    
    	                derivedKey.concat(block);
    	                blockIndexWords[0]++;
    	            }
    	            derivedKey.sigBytes = keySize * 4;
    
    	            return derivedKey;
    	        }
    	    });
    
    	    /**
    	     * Computes the Password-Based Key Derivation Function 2.
    	     *
    	     * @param {WordArray|string} password The password.
    	     * @param {WordArray|string} salt A salt.
    	     * @param {Object} cfg (Optional) The configuration options to use for this computation.
    	     *
    	     * @return {WordArray} The derived key.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var key = CryptoJS.PBKDF2(password, salt);
    	     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
    	     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
    	     */
    	    C.PBKDF2 = function (password, salt, cfg) {
    	        return PBKDF2.create(cfg).compute(password, salt);
    	    };
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Base = C_lib.Base;
    	    var WordArray = C_lib.WordArray;
    	    var C_algo = C.algo;
    	    var MD5 = C_algo.MD5;
    
    	    /**
    	     * This key derivation function is meant to conform with EVP_BytesToKey.
    	     * www.openssl.org/docs/crypto/EVP_BytesToKey.html
    	     */
    	    var EvpKDF = C_algo.EvpKDF = Base.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
    	         * @property {Hasher} hasher The hash algorithm to use. Default: MD5
    	         * @property {number} iterations The number of iterations to perform. Default: 1
    	         */
    	        cfg: Base.extend({
    	            keySize: 128/32,
    	            hasher: MD5,
    	            iterations: 1
    	        }),
    
    	        /**
    	         * Initializes a newly created key derivation function.
    	         *
    	         * @param {Object} cfg (Optional) The configuration options to use for the derivation.
    	         *
    	         * @example
    	         *
    	         *     var kdf = CryptoJS.algo.EvpKDF.create();
    	         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
    	         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
    	         */
    	        init: function (cfg) {
    	            this.cfg = this.cfg.extend(cfg);
    	        },
    
    	        /**
    	         * Derives a key from a password.
    	         *
    	         * @param {WordArray|string} password The password.
    	         * @param {WordArray|string} salt A salt.
    	         *
    	         * @return {WordArray} The derived key.
    	         *
    	         * @example
    	         *
    	         *     var key = kdf.compute(password, salt);
    	         */
    	        compute: function (password, salt) {
    	            // Shortcut
    	            var cfg = this.cfg;
    
    	            // Init hasher
    	            var hasher = cfg.hasher.create();
    
    	            // Initial values
    	            var derivedKey = WordArray.create();
    
    	            // Shortcuts
    	            var derivedKeyWords = derivedKey.words;
    	            var keySize = cfg.keySize;
    	            var iterations = cfg.iterations;
    
    	            // Generate key
    	            while (derivedKeyWords.length < keySize) {
    	                if (block) {
    	                    hasher.update(block);
    	                }
    	                var block = hasher.update(password).finalize(salt);
    	                hasher.reset();
    
    	                // Iterations
    	                for (var i = 1; i < iterations; i++) {
    	                    block = hasher.finalize(block);
    	                    hasher.reset();
    	                }
    
    	                derivedKey.concat(block);
    	            }
    	            derivedKey.sigBytes = keySize * 4;
    
    	            return derivedKey;
    	        }
    	    });
    
    	    /**
    	     * Derives a key from a password.
    	     *
    	     * @param {WordArray|string} password The password.
    	     * @param {WordArray|string} salt A salt.
    	     * @param {Object} cfg (Optional) The configuration options to use for this computation.
    	     *
    	     * @return {WordArray} The derived key.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var key = CryptoJS.EvpKDF(password, salt);
    	     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
    	     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
    	     */
    	    C.EvpKDF = function (password, salt, cfg) {
    	        return EvpKDF.create(cfg).compute(password, salt);
    	    };
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var C_algo = C.algo;
    	    var SHA256 = C_algo.SHA256;
    
    	    /**
    	     * SHA-224 hash algorithm.
    	     */
    	    var SHA224 = C_algo.SHA224 = SHA256.extend({
    	        _doReset: function () {
    	            this._hash = new WordArray.init([
    	                0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
    	                0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
    	            ]);
    	        },
    
    	        _doFinalize: function () {
    	            var hash = SHA256._doFinalize.call(this);
    
    	            hash.sigBytes -= 4;
    
    	            return hash;
    	        }
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA224('message');
    	     *     var hash = CryptoJS.SHA224(wordArray);
    	     */
    	    C.SHA224 = SHA256._createHelper(SHA224);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA224(message, key);
    	     */
    	    C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
    	}());
    
    
    	(function (undefined) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Base = C_lib.Base;
    	    var X32WordArray = C_lib.WordArray;
    
    	    /**
    	     * x64 namespace.
    	     */
    	    var C_x64 = C.x64 = {};
    
    	    /**
    	     * A 64-bit word.
    	     */
    	    var X64Word = C_x64.Word = Base.extend({
    	        /**
    	         * Initializes a newly created 64-bit word.
    	         *
    	         * @param {number} high The high 32 bits.
    	         * @param {number} low The low 32 bits.
    	         *
    	         * @example
    	         *
    	         *     var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
    	         */
    	        init: function (high, low) {
    	            this.high = high;
    	            this.low = low;
    	        }
    
    	        /**
    	         * Bitwise NOTs this word.
    	         *
    	         * @return {X64Word} A new x64-Word object after negating.
    	         *
    	         * @example
    	         *
    	         *     var negated = x64Word.not();
    	         */
    	        // not: function () {
    	            // var high = ~this.high;
    	            // var low = ~this.low;
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Bitwise ANDs this word with the passed word.
    	         *
    	         * @param {X64Word} word The x64-Word to AND with this word.
    	         *
    	         * @return {X64Word} A new x64-Word object after ANDing.
    	         *
    	         * @example
    	         *
    	         *     var anded = x64Word.and(anotherX64Word);
    	         */
    	        // and: function (word) {
    	            // var high = this.high & word.high;
    	            // var low = this.low & word.low;
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Bitwise ORs this word with the passed word.
    	         *
    	         * @param {X64Word} word The x64-Word to OR with this word.
    	         *
    	         * @return {X64Word} A new x64-Word object after ORing.
    	         *
    	         * @example
    	         *
    	         *     var ored = x64Word.or(anotherX64Word);
    	         */
    	        // or: function (word) {
    	            // var high = this.high | word.high;
    	            // var low = this.low | word.low;
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Bitwise XORs this word with the passed word.
    	         *
    	         * @param {X64Word} word The x64-Word to XOR with this word.
    	         *
    	         * @return {X64Word} A new x64-Word object after XORing.
    	         *
    	         * @example
    	         *
    	         *     var xored = x64Word.xor(anotherX64Word);
    	         */
    	        // xor: function (word) {
    	            // var high = this.high ^ word.high;
    	            // var low = this.low ^ word.low;
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Shifts this word n bits to the left.
    	         *
    	         * @param {number} n The number of bits to shift.
    	         *
    	         * @return {X64Word} A new x64-Word object after shifting.
    	         *
    	         * @example
    	         *
    	         *     var shifted = x64Word.shiftL(25);
    	         */
    	        // shiftL: function (n) {
    	            // if (n < 32) {
    	                // var high = (this.high << n) | (this.low >>> (32 - n));
    	                // var low = this.low << n;
    	            // } else {
    	                // var high = this.low << (n - 32);
    	                // var low = 0;
    	            // }
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Shifts this word n bits to the right.
    	         *
    	         * @param {number} n The number of bits to shift.
    	         *
    	         * @return {X64Word} A new x64-Word object after shifting.
    	         *
    	         * @example
    	         *
    	         *     var shifted = x64Word.shiftR(7);
    	         */
    	        // shiftR: function (n) {
    	            // if (n < 32) {
    	                // var low = (this.low >>> n) | (this.high << (32 - n));
    	                // var high = this.high >>> n;
    	            // } else {
    	                // var low = this.high >>> (n - 32);
    	                // var high = 0;
    	            // }
    
    	            // return X64Word.create(high, low);
    	        // },
    
    	        /**
    	         * Rotates this word n bits to the left.
    	         *
    	         * @param {number} n The number of bits to rotate.
    	         *
    	         * @return {X64Word} A new x64-Word object after rotating.
    	         *
    	         * @example
    	         *
    	         *     var rotated = x64Word.rotL(25);
    	         */
    	        // rotL: function (n) {
    	            // return this.shiftL(n).or(this.shiftR(64 - n));
    	        // },
    
    	        /**
    	         * Rotates this word n bits to the right.
    	         *
    	         * @param {number} n The number of bits to rotate.
    	         *
    	         * @return {X64Word} A new x64-Word object after rotating.
    	         *
    	         * @example
    	         *
    	         *     var rotated = x64Word.rotR(7);
    	         */
    	        // rotR: function (n) {
    	            // return this.shiftR(n).or(this.shiftL(64 - n));
    	        // },
    
    	        /**
    	         * Adds this word with the passed word.
    	         *
    	         * @param {X64Word} word The x64-Word to add with this word.
    	         *
    	         * @return {X64Word} A new x64-Word object after adding.
    	         *
    	         * @example
    	         *
    	         *     var added = x64Word.add(anotherX64Word);
    	         */
    	        // add: function (word) {
    	            // var low = (this.low + word.low) | 0;
    	            // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
    	            // var high = (this.high + word.high + carry) | 0;
    
    	            // return X64Word.create(high, low);
    	        // }
    	    });
    
    	    /**
    	     * An array of 64-bit words.
    	     *
    	     * @property {Array} words The array of CryptoJS.x64.Word objects.
    	     * @property {number} sigBytes The number of significant bytes in this word array.
    	     */
    	    var X64WordArray = C_x64.WordArray = Base.extend({
    	        /**
    	         * Initializes a newly created word array.
    	         *
    	         * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
    	         * @param {number} sigBytes (Optional) The number of significant bytes in the words.
    	         *
    	         * @example
    	         *
    	         *     var wordArray = CryptoJS.x64.WordArray.create();
    	         *
    	         *     var wordArray = CryptoJS.x64.WordArray.create([
    	         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),
    	         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
    	         *     ]);
    	         *
    	         *     var wordArray = CryptoJS.x64.WordArray.create([
    	         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),
    	         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
    	         *     ], 10);
    	         */
    	        init: function (words, sigBytes) {
    	            words = this.words = words || [];
    
    	            if (sigBytes != undefined) {
    	                this.sigBytes = sigBytes;
    	            } else {
    	                this.sigBytes = words.length * 8;
    	            }
    	        },
    
    	        /**
    	         * Converts this 64-bit word array to a 32-bit word array.
    	         *
    	         * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
    	         *
    	         * @example
    	         *
    	         *     var x32WordArray = x64WordArray.toX32();
    	         */
    	        toX32: function () {
    	            // Shortcuts
    	            var x64Words = this.words;
    	            var x64WordsLength = x64Words.length;
    
    	            // Convert
    	            var x32Words = [];
    	            for (var i = 0; i < x64WordsLength; i++) {
    	                var x64Word = x64Words[i];
    	                x32Words.push(x64Word.high);
    	                x32Words.push(x64Word.low);
    	            }
    
    	            return X32WordArray.create(x32Words, this.sigBytes);
    	        },
    
    	        /**
    	         * Creates a copy of this word array.
    	         *
    	         * @return {X64WordArray} The clone.
    	         *
    	         * @example
    	         *
    	         *     var clone = x64WordArray.clone();
    	         */
    	        clone: function () {
    	            var clone = Base.clone.call(this);
    
    	            // Clone "words" array
    	            var words = clone.words = this.words.slice(0);
    
    	            // Clone each X64Word object
    	            var wordsLength = words.length;
    	            for (var i = 0; i < wordsLength; i++) {
    	                words[i] = words[i].clone();
    	            }
    
    	            return clone;
    	        }
    	    });
    	}());
    
    
    	(function (Math) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var Hasher = C_lib.Hasher;
    	    var C_x64 = C.x64;
    	    var X64Word = C_x64.Word;
    	    var C_algo = C.algo;
    
    	    // Constants tables
    	    var RHO_OFFSETS = [];
    	    var PI_INDEXES  = [];
    	    var ROUND_CONSTANTS = [];
    
    	    // Compute Constants
    	    (function () {
    	        // Compute rho offset constants
    	        var x = 1, y = 0;
    	        for (var t = 0; t < 24; t++) {
    	            RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;
    
    	            var newX = y % 5;
    	            var newY = (2 * x + 3 * y) % 5;
    	            x = newX;
    	            y = newY;
    	        }
    
    	        // Compute pi index constants
    	        for (var x = 0; x < 5; x++) {
    	            for (var y = 0; y < 5; y++) {
    	                PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;
    	            }
    	        }
    
    	        // Compute round constants
    	        var LFSR = 0x01;
    	        for (var i = 0; i < 24; i++) {
    	            var roundConstantMsw = 0;
    	            var roundConstantLsw = 0;
    
    	            for (var j = 0; j < 7; j++) {
    	                if (LFSR & 0x01) {
    	                    var bitPosition = (1 << j) - 1;
    	                    if (bitPosition < 32) {
    	                        roundConstantLsw ^= 1 << bitPosition;
    	                    } else /* if (bitPosition >= 32) */ {
    	                        roundConstantMsw ^= 1 << (bitPosition - 32);
    	                    }
    	                }
    
    	                // Compute next LFSR
    	                if (LFSR & 0x80) {
    	                    // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
    	                    LFSR = (LFSR << 1) ^ 0x71;
    	                } else {
    	                    LFSR <<= 1;
    	                }
    	            }
    
    	            ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
    	        }
    	    }());
    
    	    // Reusable objects for temporary values
    	    var T = [];
    	    (function () {
    	        for (var i = 0; i < 25; i++) {
    	            T[i] = X64Word.create();
    	        }
    	    }());
    
    	    /**
    	     * SHA-3 hash algorithm.
    	     */
    	    var SHA3 = C_algo.SHA3 = Hasher.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {number} outputLength
    	         *   The desired number of bits in the output hash.
    	         *   Only values permitted are: 224, 256, 384, 512.
    	         *   Default: 512
    	         */
    	        cfg: Hasher.cfg.extend({
    	            outputLength: 512
    	        }),
    
    	        _doReset: function () {
    	            var state = this._state = []
    	            for (var i = 0; i < 25; i++) {
    	                state[i] = new X64Word.init();
    	            }
    
    	            this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcuts
    	            var state = this._state;
    	            var nBlockSizeLanes = this.blockSize / 2;
    
    	            // Absorb
    	            for (var i = 0; i < nBlockSizeLanes; i++) {
    	                // Shortcuts
    	                var M2i  = M[offset + 2 * i];
    	                var M2i1 = M[offset + 2 * i + 1];
    
    	                // Swap endian
    	                M2i = (
    	                    (((M2i << 8)  | (M2i >>> 24)) & 0x00ff00ff) |
    	                    (((M2i << 24) | (M2i >>> 8))  & 0xff00ff00)
    	                );
    	                M2i1 = (
    	                    (((M2i1 << 8)  | (M2i1 >>> 24)) & 0x00ff00ff) |
    	                    (((M2i1 << 24) | (M2i1 >>> 8))  & 0xff00ff00)
    	                );
    
    	                // Absorb message into state
    	                var lane = state[i];
    	                lane.high ^= M2i1;
    	                lane.low  ^= M2i;
    	            }
    
    	            // Rounds
    	            for (var round = 0; round < 24; round++) {
    	                // Theta
    	                for (var x = 0; x < 5; x++) {
    	                    // Mix column lanes
    	                    var tMsw = 0, tLsw = 0;
    	                    for (var y = 0; y < 5; y++) {
    	                        var lane = state[x + 5 * y];
    	                        tMsw ^= lane.high;
    	                        tLsw ^= lane.low;
    	                    }
    
    	                    // Temporary values
    	                    var Tx = T[x];
    	                    Tx.high = tMsw;
    	                    Tx.low  = tLsw;
    	                }
    	                for (var x = 0; x < 5; x++) {
    	                    // Shortcuts
    	                    var Tx4 = T[(x + 4) % 5];
    	                    var Tx1 = T[(x + 1) % 5];
    	                    var Tx1Msw = Tx1.high;
    	                    var Tx1Lsw = Tx1.low;
    
    	                    // Mix surrounding columns
    	                    var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));
    	                    var tLsw = Tx4.low  ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));
    	                    for (var y = 0; y < 5; y++) {
    	                        var lane = state[x + 5 * y];
    	                        lane.high ^= tMsw;
    	                        lane.low  ^= tLsw;
    	                    }
    	                }
    
    	                // Rho Pi
    	                for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
    	                    // Shortcuts
    	                    var lane = state[laneIndex];
    	                    var laneMsw = lane.high;
    	                    var laneLsw = lane.low;
    	                    var rhoOffset = RHO_OFFSETS[laneIndex];
    
    	                    // Rotate lanes
    	                    if (rhoOffset < 32) {
    	                        var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));
    	                        var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));
    	                    } else /* if (rhoOffset >= 32) */ {
    	                        var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));
    	                        var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));
    	                    }
    
    	                    // Transpose lanes
    	                    var TPiLane = T[PI_INDEXES[laneIndex]];
    	                    TPiLane.high = tMsw;
    	                    TPiLane.low  = tLsw;
    	                }
    
    	                // Rho pi at x = y = 0
    	                var T0 = T[0];
    	                var state0 = state[0];
    	                T0.high = state0.high;
    	                T0.low  = state0.low;
    
    	                // Chi
    	                for (var x = 0; x < 5; x++) {
    	                    for (var y = 0; y < 5; y++) {
    	                        // Shortcuts
    	                        var laneIndex = x + 5 * y;
    	                        var lane = state[laneIndex];
    	                        var TLane = T[laneIndex];
    	                        var Tx1Lane = T[((x + 1) % 5) + 5 * y];
    	                        var Tx2Lane = T[((x + 2) % 5) + 5 * y];
    
    	                        // Mix rows
    	                        lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);
    	                        lane.low  = TLane.low  ^ (~Tx1Lane.low  & Tx2Lane.low);
    	                    }
    	                }
    
    	                // Iota
    	                var lane = state[0];
    	                var roundConstant = ROUND_CONSTANTS[round];
    	                lane.high ^= roundConstant.high;
    	                lane.low  ^= roundConstant.low;;
    	            }
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    	            var blockSizeBits = this.blockSize * 32;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);
    	            dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;
    	            data.sigBytes = dataWords.length * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Shortcuts
    	            var state = this._state;
    	            var outputLengthBytes = this.cfg.outputLength / 8;
    	            var outputLengthLanes = outputLengthBytes / 8;
    
    	            // Squeeze
    	            var hashWords = [];
    	            for (var i = 0; i < outputLengthLanes; i++) {
    	                // Shortcuts
    	                var lane = state[i];
    	                var laneMsw = lane.high;
    	                var laneLsw = lane.low;
    
    	                // Swap endian
    	                laneMsw = (
    	                    (((laneMsw << 8)  | (laneMsw >>> 24)) & 0x00ff00ff) |
    	                    (((laneMsw << 24) | (laneMsw >>> 8))  & 0xff00ff00)
    	                );
    	                laneLsw = (
    	                    (((laneLsw << 8)  | (laneLsw >>> 24)) & 0x00ff00ff) |
    	                    (((laneLsw << 24) | (laneLsw >>> 8))  & 0xff00ff00)
    	                );
    
    	                // Squeeze state to retrieve hash
    	                hashWords.push(laneLsw);
    	                hashWords.push(laneMsw);
    	            }
    
    	            // Return final computed hash
    	            return new WordArray.init(hashWords, outputLengthBytes);
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    
    	            var state = clone._state = this._state.slice(0);
    	            for (var i = 0; i < 25; i++) {
    	                state[i] = state[i].clone();
    	            }
    
    	            return clone;
    	        }
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA3('message');
    	     *     var hash = CryptoJS.SHA3(wordArray);
    	     */
    	    C.SHA3 = Hasher._createHelper(SHA3);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA3(message, key);
    	     */
    	    C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
    	}(Math));
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Hasher = C_lib.Hasher;
    	    var C_x64 = C.x64;
    	    var X64Word = C_x64.Word;
    	    var X64WordArray = C_x64.WordArray;
    	    var C_algo = C.algo;
    
    	    function X64Word_create() {
    	        return X64Word.create.apply(X64Word, arguments);
    	    }
    
    	    // Constants
    	    var K = [
    	        X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
    	        X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
    	        X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
    	        X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
    	        X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
    	        X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
    	        X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
    	        X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
    	        X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
    	        X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
    	        X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
    	        X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
    	        X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
    	        X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
    	        X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
    	        X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
    	        X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
    	        X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
    	        X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
    	        X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
    	        X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
    	        X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
    	        X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
    	        X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
    	        X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
    	        X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
    	        X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
    	        X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
    	        X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
    	        X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
    	        X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
    	        X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
    	        X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
    	        X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
    	        X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
    	        X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
    	        X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
    	        X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
    	        X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
    	        X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
    	    ];
    
    	    // Reusable objects
    	    var W = [];
    	    (function () {
    	        for (var i = 0; i < 80; i++) {
    	            W[i] = X64Word_create();
    	        }
    	    }());
    
    	    /**
    	     * SHA-512 hash algorithm.
    	     */
    	    var SHA512 = C_algo.SHA512 = Hasher.extend({
    	        _doReset: function () {
    	            this._hash = new X64WordArray.init([
    	                new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
    	                new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
    	                new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
    	                new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
    	            ]);
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcuts
    	            var H = this._hash.words;
    
    	            var H0 = H[0];
    	            var H1 = H[1];
    	            var H2 = H[2];
    	            var H3 = H[3];
    	            var H4 = H[4];
    	            var H5 = H[5];
    	            var H6 = H[6];
    	            var H7 = H[7];
    
    	            var H0h = H0.high;
    	            var H0l = H0.low;
    	            var H1h = H1.high;
    	            var H1l = H1.low;
    	            var H2h = H2.high;
    	            var H2l = H2.low;
    	            var H3h = H3.high;
    	            var H3l = H3.low;
    	            var H4h = H4.high;
    	            var H4l = H4.low;
    	            var H5h = H5.high;
    	            var H5l = H5.low;
    	            var H6h = H6.high;
    	            var H6l = H6.low;
    	            var H7h = H7.high;
    	            var H7l = H7.low;
    
    	            // Working variables
    	            var ah = H0h;
    	            var al = H0l;
    	            var bh = H1h;
    	            var bl = H1l;
    	            var ch = H2h;
    	            var cl = H2l;
    	            var dh = H3h;
    	            var dl = H3l;
    	            var eh = H4h;
    	            var el = H4l;
    	            var fh = H5h;
    	            var fl = H5l;
    	            var gh = H6h;
    	            var gl = H6l;
    	            var hh = H7h;
    	            var hl = H7l;
    
    	            // Rounds
    	            for (var i = 0; i < 80; i++) {
    	                // Shortcut
    	                var Wi = W[i];
    
    	                // Extend message
    	                if (i < 16) {
    	                    var Wih = Wi.high = M[offset + i * 2]     | 0;
    	                    var Wil = Wi.low  = M[offset + i * 2 + 1] | 0;
    	                } else {
    	                    // Gamma0
    	                    var gamma0x  = W[i - 15];
    	                    var gamma0xh = gamma0x.high;
    	                    var gamma0xl = gamma0x.low;
    	                    var gamma0h  = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);
    	                    var gamma0l  = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));
    
    	                    // Gamma1
    	                    var gamma1x  = W[i - 2];
    	                    var gamma1xh = gamma1x.high;
    	                    var gamma1xl = gamma1x.low;
    	                    var gamma1h  = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);
    	                    var gamma1l  = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));
    
    	                    // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
    	                    var Wi7  = W[i - 7];
    	                    var Wi7h = Wi7.high;
    	                    var Wi7l = Wi7.low;
    
    	                    var Wi16  = W[i - 16];
    	                    var Wi16h = Wi16.high;
    	                    var Wi16l = Wi16.low;
    
    	                    var Wil = gamma0l + Wi7l;
    	                    var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);
    	                    var Wil = Wil + gamma1l;
    	                    var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);
    	                    var Wil = Wil + Wi16l;
    	                    var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);
    
    	                    Wi.high = Wih;
    	                    Wi.low  = Wil;
    	                }
    
    	                var chh  = (eh & fh) ^ (~eh & gh);
    	                var chl  = (el & fl) ^ (~el & gl);
    	                var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
    	                var majl = (al & bl) ^ (al & cl) ^ (bl & cl);
    
    	                var sigma0h = ((ah >>> 28) | (al << 4))  ^ ((ah << 30)  | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
    	                var sigma0l = ((al >>> 28) | (ah << 4))  ^ ((al << 30)  | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
    	                var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));
    	                var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));
    
    	                // t1 = h + sigma1 + ch + K[i] + W[i]
    	                var Ki  = K[i];
    	                var Kih = Ki.high;
    	                var Kil = Ki.low;
    
    	                var t1l = hl + sigma1l;
    	                var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
    	                var t1l = t1l + chl;
    	                var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
    	                var t1l = t1l + Kil;
    	                var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);
    	                var t1l = t1l + Wil;
    	                var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);
    
    	                // t2 = sigma0 + maj
    	                var t2l = sigma0l + majl;
    	                var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);
    
    	                // Update working variables
    	                hh = gh;
    	                hl = gl;
    	                gh = fh;
    	                gl = fl;
    	                fh = eh;
    	                fl = el;
    	                el = (dl + t1l) | 0;
    	                eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
    	                dh = ch;
    	                dl = cl;
    	                ch = bh;
    	                cl = bl;
    	                bh = ah;
    	                bl = al;
    	                al = (t1l + t2l) | 0;
    	                ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
    	            }
    
    	            // Intermediate hash value
    	            H0l = H0.low  = (H0l + al);
    	            H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));
    	            H1l = H1.low  = (H1l + bl);
    	            H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));
    	            H2l = H2.low  = (H2l + cl);
    	            H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));
    	            H3l = H3.low  = (H3l + dl);
    	            H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));
    	            H4l = H4.low  = (H4l + el);
    	            H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));
    	            H5l = H5.low  = (H5l + fl);
    	            H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));
    	            H6l = H6.low  = (H6l + gl);
    	            H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));
    	            H7l = H7.low  = (H7l + hl);
    	            H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcuts
    	            var data = this._data;
    	            var dataWords = data.words;
    
    	            var nBitsTotal = this._nDataBytes * 8;
    	            var nBitsLeft = data.sigBytes * 8;
    
    	            // Add padding
    	            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
    	            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
    	            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;
    	            data.sigBytes = dataWords.length * 4;
    
    	            // Hash final blocks
    	            this._process();
    
    	            // Convert hash to 32-bit word array before returning
    	            var hash = this._hash.toX32();
    
    	            // Return final computed hash
    	            return hash;
    	        },
    
    	        clone: function () {
    	            var clone = Hasher.clone.call(this);
    	            clone._hash = this._hash.clone();
    
    	            return clone;
    	        },
    
    	        blockSize: 1024/32
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA512('message');
    	     *     var hash = CryptoJS.SHA512(wordArray);
    	     */
    	    C.SHA512 = Hasher._createHelper(SHA512);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA512(message, key);
    	     */
    	    C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_x64 = C.x64;
    	    var X64Word = C_x64.Word;
    	    var X64WordArray = C_x64.WordArray;
    	    var C_algo = C.algo;
    	    var SHA512 = C_algo.SHA512;
    
    	    /**
    	     * SHA-384 hash algorithm.
    	     */
    	    var SHA384 = C_algo.SHA384 = SHA512.extend({
    	        _doReset: function () {
    	            this._hash = new X64WordArray.init([
    	                new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
    	                new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
    	                new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
    	                new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
    	            ]);
    	        },
    
    	        _doFinalize: function () {
    	            var hash = SHA512._doFinalize.call(this);
    
    	            hash.sigBytes -= 16;
    
    	            return hash;
    	        }
    	    });
    
    	    /**
    	     * Shortcut function to the hasher's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     *
    	     * @return {WordArray} The hash.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hash = CryptoJS.SHA384('message');
    	     *     var hash = CryptoJS.SHA384(wordArray);
    	     */
    	    C.SHA384 = SHA512._createHelper(SHA384);
    
    	    /**
    	     * Shortcut function to the HMAC's object interface.
    	     *
    	     * @param {WordArray|string} message The message to hash.
    	     * @param {WordArray|string} key The secret key.
    	     *
    	     * @return {WordArray} The HMAC.
    	     *
    	     * @static
    	     *
    	     * @example
    	     *
    	     *     var hmac = CryptoJS.HmacSHA384(message, key);
    	     */
    	    C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
    	}());
    
    
    	/**
    	 * Cipher core components.
    	 */
    	CryptoJS.lib.Cipher || (function (undefined) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var Base = C_lib.Base;
    	    var WordArray = C_lib.WordArray;
    	    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
    	    var C_enc = C.enc;
    	    var Utf8 = C_enc.Utf8;
    	    var Base64 = C_enc.Base64;
    	    var C_algo = C.algo;
    	    var EvpKDF = C_algo.EvpKDF;
    
    	    /**
    	     * Abstract base cipher template.
    	     *
    	     * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
    	     * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
    	     * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
    	     * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
    	     */
    	    var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {WordArray} iv The IV to use for this operation.
    	         */
    	        cfg: Base.extend(),
    
    	        /**
    	         * Creates this cipher in encryption mode.
    	         *
    	         * @param {WordArray} key The key.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {Cipher} A cipher instance.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
    	         */
    	        createEncryptor: function (key, cfg) {
    	            return this.create(this._ENC_XFORM_MODE, key, cfg);
    	        },
    
    	        /**
    	         * Creates this cipher in decryption mode.
    	         *
    	         * @param {WordArray} key The key.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {Cipher} A cipher instance.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
    	         */
    	        createDecryptor: function (key, cfg) {
    	            return this.create(this._DEC_XFORM_MODE, key, cfg);
    	        },
    
    	        /**
    	         * Initializes a newly created cipher.
    	         *
    	         * @param {number} xformMode Either the encryption or decryption transormation mode constant.
    	         * @param {WordArray} key The key.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @example
    	         *
    	         *     var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
    	         */
    	        init: function (xformMode, key, cfg) {
    	            // Apply config defaults
    	            this.cfg = this.cfg.extend(cfg);
    
    	            // Store transform mode and key
    	            this._xformMode = xformMode;
    	            this._key = key;
    
    	            // Set initial values
    	            this.reset();
    	        },
    
    	        /**
    	         * Resets this cipher to its initial state.
    	         *
    	         * @example
    	         *
    	         *     cipher.reset();
    	         */
    	        reset: function () {
    	            // Reset data buffer
    	            BufferedBlockAlgorithm.reset.call(this);
    
    	            // Perform concrete-cipher logic
    	            this._doReset();
    	        },
    
    	        /**
    	         * Adds data to be encrypted or decrypted.
    	         *
    	         * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
    	         *
    	         * @return {WordArray} The data after processing.
    	         *
    	         * @example
    	         *
    	         *     var encrypted = cipher.process('data');
    	         *     var encrypted = cipher.process(wordArray);
    	         */
    	        process: function (dataUpdate) {
    	            // Append
    	            this._append(dataUpdate);
    
    	            // Process available blocks
    	            return this._process();
    	        },
    
    	        /**
    	         * Finalizes the encryption or decryption process.
    	         * Note that the finalize operation is effectively a destructive, read-once operation.
    	         *
    	         * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
    	         *
    	         * @return {WordArray} The data after final processing.
    	         *
    	         * @example
    	         *
    	         *     var encrypted = cipher.finalize();
    	         *     var encrypted = cipher.finalize('data');
    	         *     var encrypted = cipher.finalize(wordArray);
    	         */
    	        finalize: function (dataUpdate) {
    	            // Final data update
    	            if (dataUpdate) {
    	                this._append(dataUpdate);
    	            }
    
    	            // Perform concrete-cipher logic
    	            var finalProcessedData = this._doFinalize();
    
    	            return finalProcessedData;
    	        },
    
    	        keySize: 128/32,
    
    	        ivSize: 128/32,
    
    	        _ENC_XFORM_MODE: 1,
    
    	        _DEC_XFORM_MODE: 2,
    
    	        /**
    	         * Creates shortcut functions to a cipher's object interface.
    	         *
    	         * @param {Cipher} cipher The cipher to create a helper for.
    	         *
    	         * @return {Object} An object with encrypt and decrypt shortcut functions.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
    	         */
    	        _createHelper: (function () {
    	            function selectCipherStrategy(key) {
    	                if (typeof key == 'string') {
    	                    return PasswordBasedCipher;
    	                } else {
    	                    return SerializableCipher;
    	                }
    	            }
    
    	            return function (cipher) {
    	                return {
    	                    encrypt: function (message, key, cfg) {
    	                        return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
    	                    },
    
    	                    decrypt: function (ciphertext, key, cfg) {
    	                        return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
    	                    }
    	                };
    	            };
    	        }())
    	    });
    
    	    /**
    	     * Abstract base stream cipher template.
    	     *
    	     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
    	     */
    	    var StreamCipher = C_lib.StreamCipher = Cipher.extend({
    	        _doFinalize: function () {
    	            // Process partial blocks
    	            var finalProcessedBlocks = this._process(!!'flush');
    
    	            return finalProcessedBlocks;
    	        },
    
    	        blockSize: 1
    	    });
    
    	    /**
    	     * Mode namespace.
    	     */
    	    var C_mode = C.mode = {};
    
    	    /**
    	     * Abstract base block cipher mode template.
    	     */
    	    var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
    	        /**
    	         * Creates this mode for encryption.
    	         *
    	         * @param {Cipher} cipher A block cipher instance.
    	         * @param {Array} iv The IV words.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
    	         */
    	        createEncryptor: function (cipher, iv) {
    	            return this.Encryptor.create(cipher, iv);
    	        },
    
    	        /**
    	         * Creates this mode for decryption.
    	         *
    	         * @param {Cipher} cipher A block cipher instance.
    	         * @param {Array} iv The IV words.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
    	         */
    	        createDecryptor: function (cipher, iv) {
    	            return this.Decryptor.create(cipher, iv);
    	        },
    
    	        /**
    	         * Initializes a newly created mode.
    	         *
    	         * @param {Cipher} cipher A block cipher instance.
    	         * @param {Array} iv The IV words.
    	         *
    	         * @example
    	         *
    	         *     var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
    	         */
    	        init: function (cipher, iv) {
    	            this._cipher = cipher;
    	            this._iv = iv;
    	        }
    	    });
    
    	    /**
    	     * Cipher Block Chaining mode.
    	     */
    	    var CBC = C_mode.CBC = (function () {
    	        /**
    	         * Abstract base CBC mode.
    	         */
    	        var CBC = BlockCipherMode.extend();
    
    	        /**
    	         * CBC encryptor.
    	         */
    	        CBC.Encryptor = CBC.extend({
    	            /**
    	             * Processes the data block at offset.
    	             *
    	             * @param {Array} words The data words to operate on.
    	             * @param {number} offset The offset where the block starts.
    	             *
    	             * @example
    	             *
    	             *     mode.processBlock(data.words, offset);
    	             */
    	            processBlock: function (words, offset) {
    	                // Shortcuts
    	                var cipher = this._cipher;
    	                var blockSize = cipher.blockSize;
    
    	                // XOR and encrypt
    	                xorBlock.call(this, words, offset, blockSize);
    	                cipher.encryptBlock(words, offset);
    
    	                // Remember this block to use with next block
    	                this._prevBlock = words.slice(offset, offset + blockSize);
    	            }
    	        });
    
    	        /**
    	         * CBC decryptor.
    	         */
    	        CBC.Decryptor = CBC.extend({
    	            /**
    	             * Processes the data block at offset.
    	             *
    	             * @param {Array} words The data words to operate on.
    	             * @param {number} offset The offset where the block starts.
    	             *
    	             * @example
    	             *
    	             *     mode.processBlock(data.words, offset);
    	             */
    	            processBlock: function (words, offset) {
    	                // Shortcuts
    	                var cipher = this._cipher;
    	                var blockSize = cipher.blockSize;
    
    	                // Remember this block to use with next block
    	                var thisBlock = words.slice(offset, offset + blockSize);
    
    	                // Decrypt and XOR
    	                cipher.decryptBlock(words, offset);
    	                xorBlock.call(this, words, offset, blockSize);
    
    	                // This block becomes the previous block
    	                this._prevBlock = thisBlock;
    	            }
    	        });
    
    	        function xorBlock(words, offset, blockSize) {
    	            // Shortcut
    	            var iv = this._iv;
    
    	            // Choose mixing block
    	            if (iv) {
    	                var block = iv;
    
    	                // Remove IV for subsequent blocks
    	                this._iv = undefined;
    	            } else {
    	                var block = this._prevBlock;
    	            }
    
    	            // XOR blocks
    	            for (var i = 0; i < blockSize; i++) {
    	                words[offset + i] ^= block[i];
    	            }
    	        }
    
    	        return CBC;
    	    }());
    
    	    /**
    	     * Padding namespace.
    	     */
    	    var C_pad = C.pad = {};
    
    	    /**
    	     * PKCS #5/7 padding strategy.
    	     */
    	    var Pkcs7 = C_pad.Pkcs7 = {
    	        /**
    	         * Pads data using the algorithm defined in PKCS #5/7.
    	         *
    	         * @param {WordArray} data The data to pad.
    	         * @param {number} blockSize The multiple that the data should be padded to.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     CryptoJS.pad.Pkcs7.pad(wordArray, 4);
    	         */
    	        pad: function (data, blockSize) {
    	            // Shortcut
    	            var blockSizeBytes = blockSize * 4;
    
    	            // Count padding bytes
    	            var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
    
    	            // Create padding word
    	            var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;
    
    	            // Create padding
    	            var paddingWords = [];
    	            for (var i = 0; i < nPaddingBytes; i += 4) {
    	                paddingWords.push(paddingWord);
    	            }
    	            var padding = WordArray.create(paddingWords, nPaddingBytes);
    
    	            // Add padding
    	            data.concat(padding);
    	        },
    
    	        /**
    	         * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
    	         *
    	         * @param {WordArray} data The data to unpad.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     CryptoJS.pad.Pkcs7.unpad(wordArray);
    	         */
    	        unpad: function (data) {
    	            // Get number of padding bytes from last byte
    	            var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
    
    	            // Remove padding
    	            data.sigBytes -= nPaddingBytes;
    	        }
    	    };
    
    	    /**
    	     * Abstract base block cipher template.
    	     *
    	     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
    	     */
    	    var BlockCipher = C_lib.BlockCipher = Cipher.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {Mode} mode The block mode to use. Default: CBC
    	         * @property {Padding} padding The padding strategy to use. Default: Pkcs7
    	         */
    	        cfg: Cipher.cfg.extend({
    	            mode: CBC,
    	            padding: Pkcs7
    	        }),
    
    	        reset: function () {
    	            // Reset cipher
    	            Cipher.reset.call(this);
    
    	            // Shortcuts
    	            var cfg = this.cfg;
    	            var iv = cfg.iv;
    	            var mode = cfg.mode;
    
    	            // Reset block mode
    	            if (this._xformMode == this._ENC_XFORM_MODE) {
    	                var modeCreator = mode.createEncryptor;
    	            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
    	                var modeCreator = mode.createDecryptor;
    
    	                // Keep at least one block in the buffer for unpadding
    	                this._minBufferSize = 1;
    	            }
    	            this._mode = modeCreator.call(mode, this, iv && iv.words);
    	        },
    
    	        _doProcessBlock: function (words, offset) {
    	            this._mode.processBlock(words, offset);
    	        },
    
    	        _doFinalize: function () {
    	            // Shortcut
    	            var padding = this.cfg.padding;
    
    	            // Finalize
    	            if (this._xformMode == this._ENC_XFORM_MODE) {
    	                // Pad data
    	                padding.pad(this._data, this.blockSize);
    
    	                // Process final blocks
    	                var finalProcessedBlocks = this._process(!!'flush');
    	            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
    	                // Process final blocks
    	                var finalProcessedBlocks = this._process(!!'flush');
    
    	                // Unpad data
    	                padding.unpad(finalProcessedBlocks);
    	            }
    
    	            return finalProcessedBlocks;
    	        },
    
    	        blockSize: 128/32
    	    });
    
    	    /**
    	     * A collection of cipher parameters.
    	     *
    	     * @property {WordArray} ciphertext The raw ciphertext.
    	     * @property {WordArray} key The key to this ciphertext.
    	     * @property {WordArray} iv The IV used in the ciphering operation.
    	     * @property {WordArray} salt The salt used with a key derivation function.
    	     * @property {Cipher} algorithm The cipher algorithm.
    	     * @property {Mode} mode The block mode used in the ciphering operation.
    	     * @property {Padding} padding The padding scheme used in the ciphering operation.
    	     * @property {number} blockSize The block size of the cipher.
    	     * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
    	     */
    	    var CipherParams = C_lib.CipherParams = Base.extend({
    	        /**
    	         * Initializes a newly created cipher params object.
    	         *
    	         * @param {Object} cipherParams An object with any of the possible cipher parameters.
    	         *
    	         * @example
    	         *
    	         *     var cipherParams = CryptoJS.lib.CipherParams.create({
    	         *         ciphertext: ciphertextWordArray,
    	         *         key: keyWordArray,
    	         *         iv: ivWordArray,
    	         *         salt: saltWordArray,
    	         *         algorithm: CryptoJS.algo.AES,
    	         *         mode: CryptoJS.mode.CBC,
    	         *         padding: CryptoJS.pad.PKCS7,
    	         *         blockSize: 4,
    	         *         formatter: CryptoJS.format.OpenSSL
    	         *     });
    	         */
    	        init: function (cipherParams) {
    	            this.mixIn(cipherParams);
    	        },
    
    	        /**
    	         * Converts this cipher params object to a string.
    	         *
    	         * @param {Format} formatter (Optional) The formatting strategy to use.
    	         *
    	         * @return {string} The stringified cipher params.
    	         *
    	         * @throws Error If neither the formatter nor the default formatter is set.
    	         *
    	         * @example
    	         *
    	         *     var string = cipherParams + '';
    	         *     var string = cipherParams.toString();
    	         *     var string = cipherParams.toString(CryptoJS.format.OpenSSL);
    	         */
    	        toString: function (formatter) {
    	            return (formatter || this.formatter).stringify(this);
    	        }
    	    });
    
    	    /**
    	     * Format namespace.
    	     */
    	    var C_format = C.format = {};
    
    	    /**
    	     * OpenSSL formatting strategy.
    	     */
    	    var OpenSSLFormatter = C_format.OpenSSL = {
    	        /**
    	         * Converts a cipher params object to an OpenSSL-compatible string.
    	         *
    	         * @param {CipherParams} cipherParams The cipher params object.
    	         *
    	         * @return {string} The OpenSSL-compatible string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
    	         */
    	        stringify: function (cipherParams) {
    	            // Shortcuts
    	            var ciphertext = cipherParams.ciphertext;
    	            var salt = cipherParams.salt;
    
    	            // Format
    	            if (salt) {
    	                var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
    	            } else {
    	                var wordArray = ciphertext;
    	            }
    
    	            return wordArray.toString(Base64);
    	        },
    
    	        /**
    	         * Converts an OpenSSL-compatible string to a cipher params object.
    	         *
    	         * @param {string} openSSLStr The OpenSSL-compatible string.
    	         *
    	         * @return {CipherParams} The cipher params object.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
    	         */
    	        parse: function (openSSLStr) {
    	            // Parse base64
    	            var ciphertext = Base64.parse(openSSLStr);
    
    	            // Shortcut
    	            var ciphertextWords = ciphertext.words;
    
    	            // Test for salt
    	            if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
    	                // Extract salt
    	                var salt = WordArray.create(ciphertextWords.slice(2, 4));
    
    	                // Remove salt from ciphertext
    	                ciphertextWords.splice(0, 4);
    	                ciphertext.sigBytes -= 16;
    	            }
    
    	            return CipherParams.create({ ciphertext: ciphertext, salt: salt });
    	        }
    	    };
    
    	    /**
    	     * A cipher wrapper that returns ciphertext as a serializable cipher params object.
    	     */
    	    var SerializableCipher = C_lib.SerializableCipher = Base.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
    	         */
    	        cfg: Base.extend({
    	            format: OpenSSLFormatter
    	        }),
    
    	        /**
    	         * Encrypts a message.
    	         *
    	         * @param {Cipher} cipher The cipher algorithm to use.
    	         * @param {WordArray|string} message The message to encrypt.
    	         * @param {WordArray} key The key.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {CipherParams} A cipher params object.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
    	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
    	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
    	         */
    	        encrypt: function (cipher, message, key, cfg) {
    	            // Apply config defaults
    	            cfg = this.cfg.extend(cfg);
    
    	            // Encrypt
    	            var encryptor = cipher.createEncryptor(key, cfg);
    	            var ciphertext = encryptor.finalize(message);
    
    	            // Shortcut
    	            var cipherCfg = encryptor.cfg;
    
    	            // Create and return serializable cipher params
    	            return CipherParams.create({
    	                ciphertext: ciphertext,
    	                key: key,
    	                iv: cipherCfg.iv,
    	                algorithm: cipher,
    	                mode: cipherCfg.mode,
    	                padding: cipherCfg.padding,
    	                blockSize: cipher.blockSize,
    	                formatter: cfg.format
    	            });
    	        },
    
    	        /**
    	         * Decrypts serialized ciphertext.
    	         *
    	         * @param {Cipher} cipher The cipher algorithm to use.
    	         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
    	         * @param {WordArray} key The key.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {WordArray} The plaintext.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
    	         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
    	         */
    	        decrypt: function (cipher, ciphertext, key, cfg) {
    	            // Apply config defaults
    	            cfg = this.cfg.extend(cfg);
    
    	            // Convert string to CipherParams
    	            ciphertext = this._parse(ciphertext, cfg.format);
    
    	            // Decrypt
    	            var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
    
    	            return plaintext;
    	        },
    
    	        /**
    	         * Converts serialized ciphertext to CipherParams,
    	         * else assumed CipherParams already and returns ciphertext unchanged.
    	         *
    	         * @param {CipherParams|string} ciphertext The ciphertext.
    	         * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
    	         *
    	         * @return {CipherParams} The unserialized ciphertext.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
    	         */
    	        _parse: function (ciphertext, format) {
    	            if (typeof ciphertext == 'string') {
    	                return format.parse(ciphertext, this);
    	            } else {
    	                return ciphertext;
    	            }
    	        }
    	    });
    
    	    /**
    	     * Key derivation function namespace.
    	     */
    	    var C_kdf = C.kdf = {};
    
    	    /**
    	     * OpenSSL key derivation function.
    	     */
    	    var OpenSSLKdf = C_kdf.OpenSSL = {
    	        /**
    	         * Derives a key and IV from a password.
    	         *
    	         * @param {string} password The password to derive from.
    	         * @param {number} keySize The size in words of the key to generate.
    	         * @param {number} ivSize The size in words of the IV to generate.
    	         * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
    	         *
    	         * @return {CipherParams} A cipher params object with the key, IV, and salt.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
    	         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
    	         */
    	        execute: function (password, keySize, ivSize, salt) {
    	            // Generate random salt
    	            if (!salt) {
    	                salt = WordArray.random(64/8);
    	            }
    
    	            // Derive key and IV
    	            var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
    
    	            // Separate key and IV
    	            var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
    	            key.sigBytes = keySize * 4;
    
    	            // Return params
    	            return CipherParams.create({ key: key, iv: iv, salt: salt });
    	        }
    	    };
    
    	    /**
    	     * 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({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
    	         */
    	        cfg: SerializableCipher.cfg.extend({
    	            kdf: OpenSSLKdf
    	        }),
    
    	        /**
    	         * Encrypts a message using a password.
    	         *
    	         * @param {Cipher} cipher The cipher algorithm to use.
    	         * @param {WordArray|string} message The message to encrypt.
    	         * @param {string} password The password.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {CipherParams} A cipher params object.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
    	         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
    	         */
    	        encrypt: function (cipher, message, password, cfg) {
    	            // Apply config defaults
    	            cfg = this.cfg.extend(cfg);
    
    	            // Derive key and other params
    	            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
    
    	            // Add IV to config
    	            cfg.iv = derivedParams.iv;
    
    	            // Encrypt
    	            var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
    
    	            // Mix in derived params
    	            ciphertext.mixIn(derivedParams);
    
    	            return ciphertext;
    	        },
    
    	        /**
    	         * Decrypts serialized ciphertext using a password.
    	         *
    	         * @param {Cipher} cipher The cipher algorithm to use.
    	         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
    	         * @param {string} password The password.
    	         * @param {Object} cfg (Optional) The configuration options to use for this operation.
    	         *
    	         * @return {WordArray} The plaintext.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
    	         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
    	         */
    	        decrypt: function (cipher, ciphertext, password, cfg) {
    	            // Apply config defaults
    	            cfg = this.cfg.extend(cfg);
    
    	            // Convert string to CipherParams
    	            ciphertext = this._parse(ciphertext, cfg.format);
    
    	            // Derive key and other params
    	            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
    
    	            // Add IV to config
    	            cfg.iv = derivedParams.iv;
    
    	            // Decrypt
    	            var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
    
    	            return plaintext;
    	        }
    	    });
    	}());
    
    
    	/**
    	 * Cipher Feedback block mode.
    	 */
    	CryptoJS.mode.CFB = (function () {
    	    var CFB = CryptoJS.lib.BlockCipherMode.extend();
    
    	    CFB.Encryptor = CFB.extend({
    	        processBlock: function (words, offset) {
    	            // Shortcuts
    	            var cipher = this._cipher;
    	            var blockSize = cipher.blockSize;
    
    	            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
    
    	            // Remember this block to use with next block
    	            this._prevBlock = words.slice(offset, offset + blockSize);
    	        }
    	    });
    
    	    CFB.Decryptor = CFB.extend({
    	        processBlock: function (words, offset) {
    	            // Shortcuts
    	            var cipher = this._cipher;
    	            var blockSize = cipher.blockSize;
    
    	            // Remember this block to use with next block
    	            var thisBlock = words.slice(offset, offset + blockSize);
    
    	            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
    
    	            // This block becomes the previous block
    	            this._prevBlock = thisBlock;
    	        }
    	    });
    
    	    function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
    	        // Shortcut
    	        var iv = this._iv;
    
    	        // Generate keystream
    	        if (iv) {
    	            var keystream = iv.slice(0);
    
    	            // Remove IV for subsequent blocks
    	            this._iv = undefined;
    	        } else {
    	            var keystream = this._prevBlock;
    	        }
    	        cipher.encryptBlock(keystream, 0);
    
    	        // Encrypt
    	        for (var i = 0; i < blockSize; i++) {
    	            words[offset + i] ^= keystream[i];
    	        }
    	    }
    
    	    return CFB;
    	}());
    
    
    	/**
    	 * Electronic Codebook block mode.
    	 */
    	CryptoJS.mode.ECB = (function () {
    	    var ECB = CryptoJS.lib.BlockCipherMode.extend();
    
    	    ECB.Encryptor = ECB.extend({
    	        processBlock: function (words, offset) {
    	            this._cipher.encryptBlock(words, offset);
    	        }
    	    });
    
    	    ECB.Decryptor = ECB.extend({
    	        processBlock: function (words, offset) {
    	            this._cipher.decryptBlock(words, offset);
    	        }
    	    });
    
    	    return ECB;
    	}());
    
    
    	/**
    	 * ANSI X.923 padding strategy.
    	 */
    	CryptoJS.pad.AnsiX923 = {
    	    pad: function (data, blockSize) {
    	        // Shortcuts
    	        var dataSigBytes = data.sigBytes;
    	        var blockSizeBytes = blockSize * 4;
    
    	        // Count padding bytes
    	        var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
    
    	        // Compute last byte position
    	        var lastBytePos = dataSigBytes + nPaddingBytes - 1;
    
    	        // Pad
    	        data.clamp();
    	        data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
    	        data.sigBytes += nPaddingBytes;
    	    },
    
    	    unpad: function (data) {
    	        // Get number of padding bytes from last byte
    	        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
    
    	        // Remove padding
    	        data.sigBytes -= nPaddingBytes;
    	    }
    	};
    
    
    	/**
    	 * ISO 10126 padding strategy.
    	 */
    	CryptoJS.pad.Iso10126 = {
    	    pad: function (data, blockSize) {
    	        // Shortcut
    	        var blockSizeBytes = blockSize * 4;
    
    	        // Count padding bytes
    	        var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
    
    	        // Pad
    	        data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
    	             concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
    	    },
    
    	    unpad: function (data) {
    	        // Get number of padding bytes from last byte
    	        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
    
    	        // Remove padding
    	        data.sigBytes -= nPaddingBytes;
    	    }
    	};
    
    
    	/**
    	 * ISO/IEC 9797-1 Padding Method 2.
    	 */
    	CryptoJS.pad.Iso97971 = {
    	    pad: function (data, blockSize) {
    	        // Add 0x80 byte
    	        data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
    
    	        // Zero pad the rest
    	        CryptoJS.pad.ZeroPadding.pad(data, blockSize);
    	    },
    
    	    unpad: function (data) {
    	        // Remove zero padding
    	        CryptoJS.pad.ZeroPadding.unpad(data);
    
    	        // Remove one more byte -- the 0x80 byte
    	        data.sigBytes--;
    	    }
    	};
    
    
    	/**
    	 * Output Feedback block mode.
    	 */
    	CryptoJS.mode.OFB = (function () {
    	    var OFB = CryptoJS.lib.BlockCipherMode.extend();
    
    	    var Encryptor = OFB.Encryptor = OFB.extend({
    	        processBlock: function (words, offset) {
    	            // Shortcuts
    	            var cipher = this._cipher
    	            var blockSize = cipher.blockSize;
    	            var iv = this._iv;
    	            var keystream = this._keystream;
    
    	            // Generate keystream
    	            if (iv) {
    	                keystream = this._keystream = iv.slice(0);
    
    	                // Remove IV for subsequent blocks
    	                this._iv = undefined;
    	            }
    	            cipher.encryptBlock(keystream, 0);
    
    	            // Encrypt
    	            for (var i = 0; i < blockSize; i++) {
    	                words[offset + i] ^= keystream[i];
    	            }
    	        }
    	    });
    
    	    OFB.Decryptor = Encryptor;
    
    	    return OFB;
    	}());
    
    
    	/**
    	 * A noop padding strategy.
    	 */
    	CryptoJS.pad.NoPadding = {
    	    pad: function () {
    	    },
    
    	    unpad: function () {
    	    }
    	};
    
    
    	(function (undefined) {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var CipherParams = C_lib.CipherParams;
    	    var C_enc = C.enc;
    	    var Hex = C_enc.Hex;
    	    var C_format = C.format;
    
    	    var HexFormatter = C_format.Hex = {
    	        /**
    	         * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
    	         *
    	         * @param {CipherParams} cipherParams The cipher params object.
    	         *
    	         * @return {string} The hexadecimally encoded string.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var hexString = CryptoJS.format.Hex.stringify(cipherParams);
    	         */
    	        stringify: function (cipherParams) {
    	            return cipherParams.ciphertext.toString(Hex);
    	        },
    
    	        /**
    	         * Converts a hexadecimally encoded ciphertext string to a cipher params object.
    	         *
    	         * @param {string} input The hexadecimally encoded string.
    	         *
    	         * @return {CipherParams} The cipher params object.
    	         *
    	         * @static
    	         *
    	         * @example
    	         *
    	         *     var cipherParams = CryptoJS.format.Hex.parse(hexString);
    	         */
    	        parse: function (input) {
    	            var ciphertext = Hex.parse(input);
    	            return CipherParams.create({ ciphertext: ciphertext });
    	        }
    	    };
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var BlockCipher = C_lib.BlockCipher;
    	    var C_algo = C.algo;
    
    	    // Lookup tables
    	    var SBOX = [];
    	    var INV_SBOX = [];
    	    var SUB_MIX_0 = [];
    	    var SUB_MIX_1 = [];
    	    var SUB_MIX_2 = [];
    	    var SUB_MIX_3 = [];
    	    var INV_SUB_MIX_0 = [];
    	    var INV_SUB_MIX_1 = [];
    	    var INV_SUB_MIX_2 = [];
    	    var INV_SUB_MIX_3 = [];
    
    	    // Compute lookup tables
    	    (function () {
    	        // Compute double table
    	        var d = [];
    	        for (var i = 0; i < 256; i++) {
    	            if (i < 128) {
    	                d[i] = i << 1;
    	            } else {
    	                d[i] = (i << 1) ^ 0x11b;
    	            }
    	        }
    
    	        // Walk GF(2^8)
    	        var x = 0;
    	        var xi = 0;
    	        for (var i = 0; i < 256; i++) {
    	            // Compute sbox
    	            var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
    	            sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
    	            SBOX[x] = sx;
    	            INV_SBOX[sx] = x;
    
    	            // Compute multiplication
    	            var x2 = d[x];
    	            var x4 = d[x2];
    	            var x8 = d[x4];
    
    	            // Compute sub bytes, mix columns tables
    	            var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
    	            SUB_MIX_0[x] = (t << 24) | (t >>> 8);
    	            SUB_MIX_1[x] = (t << 16) | (t >>> 16);
    	            SUB_MIX_2[x] = (t << 8)  | (t >>> 24);
    	            SUB_MIX_3[x] = t;
    
    	            // Compute inv sub bytes, inv mix columns tables
    	            var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
    	            INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
    	            INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
    	            INV_SUB_MIX_2[sx] = (t << 8)  | (t >>> 24);
    	            INV_SUB_MIX_3[sx] = t;
    
    	            // Compute next counter
    	            if (!x) {
    	                x = xi = 1;
    	            } else {
    	                x = x2 ^ d[d[d[x8 ^ x2]]];
    	                xi ^= d[d[xi]];
    	            }
    	        }
    	    }());
    
    	    // Precomputed Rcon lookup
    	    var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
    
    	    /**
    	     * AES block cipher algorithm.
    	     */
    	    var AES = C_algo.AES = BlockCipher.extend({
    	        _doReset: function () {
    	            // Skip reset of nRounds has been set before and key did not change
    	            if (this._nRounds && this._keyPriorReset === this._key) {
    	                return;
    	            }
    
    	            // Shortcuts
    	            var key = this._keyPriorReset = this._key;
    	            var keyWords = key.words;
    	            var keySize = key.sigBytes / 4;
    
    	            // Compute number of rounds
    	            var nRounds = this._nRounds = keySize + 6;
    
    	            // Compute number of key schedule rows
    	            var ksRows = (nRounds + 1) * 4;
    
    	            // Compute key schedule
    	            var keySchedule = this._keySchedule = [];
    	            for (var ksRow = 0; ksRow < ksRows; ksRow++) {
    	                if (ksRow < keySize) {
    	                    keySchedule[ksRow] = keyWords[ksRow];
    	                } else {
    	                    var t = keySchedule[ksRow - 1];
    
    	                    if (!(ksRow % keySize)) {
    	                        // Rot word
    	                        t = (t << 8) | (t >>> 24);
    
    	                        // Sub word
    	                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
    
    	                        // Mix Rcon
    	                        t ^= RCON[(ksRow / keySize) | 0] << 24;
    	                    } else if (keySize > 6 && ksRow % keySize == 4) {
    	                        // Sub word
    	                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
    	                    }
    
    	                    keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
    	                }
    	            }
    
    	            // Compute inv key schedule
    	            var invKeySchedule = this._invKeySchedule = [];
    	            for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
    	                var ksRow = ksRows - invKsRow;
    
    	                if (invKsRow % 4) {
    	                    var t = keySchedule[ksRow];
    	                } else {
    	                    var t = keySchedule[ksRow - 4];
    	                }
    
    	                if (invKsRow < 4 || ksRow <= 4) {
    	                    invKeySchedule[invKsRow] = t;
    	                } else {
    	                    invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
    	                                               INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
    	                }
    	            }
    	        },
    
    	        encryptBlock: function (M, offset) {
    	            this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
    	        },
    
    	        decryptBlock: function (M, offset) {
    	            // Swap 2nd and 4th rows
    	            var t = M[offset + 1];
    	            M[offset + 1] = M[offset + 3];
    	            M[offset + 3] = t;
    
    	            this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
    
    	            // Inv swap 2nd and 4th rows
    	            var t = M[offset + 1];
    	            M[offset + 1] = M[offset + 3];
    	            M[offset + 3] = t;
    	        },
    
    	        _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
    	            // Shortcut
    	            var nRounds = this._nRounds;
    
    	            // Get input, add round key
    	            var s0 = M[offset]     ^ keySchedule[0];
    	            var s1 = M[offset + 1] ^ keySchedule[1];
    	            var s2 = M[offset + 2] ^ keySchedule[2];
    	            var s3 = M[offset + 3] ^ keySchedule[3];
    
    	            // Key schedule row counter
    	            var ksRow = 4;
    
    	            // Rounds
    	            for (var round = 1; round < nRounds; round++) {
    	                // Shift rows, sub bytes, mix columns, add round key
    	                var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
    	                var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
    	                var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
    	                var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
    
    	                // Update state
    	                s0 = t0;
    	                s1 = t1;
    	                s2 = t2;
    	                s3 = t3;
    	            }
    
    	            // Shift rows, sub bytes, add round key
    	            var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
    	            var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
    	            var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
    	            var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
    
    	            // Set output
    	            M[offset]     = t0;
    	            M[offset + 1] = t1;
    	            M[offset + 2] = t2;
    	            M[offset + 3] = t3;
    	        },
    
    	        keySize: 256/32
    	    });
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.AES.decrypt(ciphertext, key, cfg);
    	     */
    	    C.AES = BlockCipher._createHelper(AES);
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var WordArray = C_lib.WordArray;
    	    var BlockCipher = C_lib.BlockCipher;
    	    var C_algo = C.algo;
    
    	    // Permuted Choice 1 constants
    	    var PC1 = [
    	        57, 49, 41, 33, 25, 17, 9,  1,
    	        58, 50, 42, 34, 26, 18, 10, 2,
    	        59, 51, 43, 35, 27, 19, 11, 3,
    	        60, 52, 44, 36, 63, 55, 47, 39,
    	        31, 23, 15, 7,  62, 54, 46, 38,
    	        30, 22, 14, 6,  61, 53, 45, 37,
    	        29, 21, 13, 5,  28, 20, 12, 4
    	    ];
    
    	    // Permuted Choice 2 constants
    	    var PC2 = [
    	        14, 17, 11, 24, 1,  5,
    	        3,  28, 15, 6,  21, 10,
    	        23, 19, 12, 4,  26, 8,
    	        16, 7,  27, 20, 13, 2,
    	        41, 52, 31, 37, 47, 55,
    	        30, 40, 51, 45, 33, 48,
    	        44, 49, 39, 56, 34, 53,
    	        46, 42, 50, 36, 29, 32
    	    ];
    
    	    // Cumulative bit shift constants
    	    var BIT_SHIFTS = [1,  2,  4,  6,  8,  10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
    
    	    // SBOXes and round permutation constants
    	    var SBOX_P = [
    	        {
    	            0x0: 0x808200,
    	            0x10000000: 0x8000,
    	            0x20000000: 0x808002,
    	            0x30000000: 0x2,
    	            0x40000000: 0x200,
    	            0x50000000: 0x808202,
    	            0x60000000: 0x800202,
    	            0x70000000: 0x800000,
    	            0x80000000: 0x202,
    	            0x90000000: 0x800200,
    	            0xa0000000: 0x8200,
    	            0xb0000000: 0x808000,
    	            0xc0000000: 0x8002,
    	            0xd0000000: 0x800002,
    	            0xe0000000: 0x0,
    	            0xf0000000: 0x8202,
    	            0x8000000: 0x0,
    	            0x18000000: 0x808202,
    	            0x28000000: 0x8202,
    	            0x38000000: 0x8000,
    	            0x48000000: 0x808200,
    	            0x58000000: 0x200,
    	            0x68000000: 0x808002,
    	            0x78000000: 0x2,
    	            0x88000000: 0x800200,
    	            0x98000000: 0x8200,
    	            0xa8000000: 0x808000,
    	            0xb8000000: 0x800202,
    	            0xc8000000: 0x800002,
    	            0xd8000000: 0x8002,
    	            0xe8000000: 0x202,
    	            0xf8000000: 0x800000,
    	            0x1: 0x8000,
    	            0x10000001: 0x2,
    	            0x20000001: 0x808200,
    	            0x30000001: 0x800000,
    	            0x40000001: 0x808002,
    	            0x50000001: 0x8200,
    	            0x60000001: 0x200,
    	            0x70000001: 0x800202,
    	            0x80000001: 0x808202,
    	            0x90000001: 0x808000,
    	            0xa0000001: 0x800002,
    	            0xb0000001: 0x8202,
    	            0xc0000001: 0x202,
    	            0xd0000001: 0x800200,
    	            0xe0000001: 0x8002,
    	            0xf0000001: 0x0,
    	            0x8000001: 0x808202,
    	            0x18000001: 0x808000,
    	            0x28000001: 0x800000,
    	            0x38000001: 0x200,
    	            0x48000001: 0x8000,
    	            0x58000001: 0x800002,
    	            0x68000001: 0x2,
    	            0x78000001: 0x8202,
    	            0x88000001: 0x8002,
    	            0x98000001: 0x800202,
    	            0xa8000001: 0x202,
    	            0xb8000001: 0x808200,
    	            0xc8000001: 0x800200,
    	            0xd8000001: 0x0,
    	            0xe8000001: 0x8200,
    	            0xf8000001: 0x808002
    	        },
    	        {
    	            0x0: 0x40084010,
    	            0x1000000: 0x4000,
    	            0x2000000: 0x80000,
    	            0x3000000: 0x40080010,
    	            0x4000000: 0x40000010,
    	            0x5000000: 0x40084000,
    	            0x6000000: 0x40004000,
    	            0x7000000: 0x10,
    	            0x8000000: 0x84000,
    	            0x9000000: 0x40004010,
    	            0xa000000: 0x40000000,
    	            0xb000000: 0x84010,
    	            0xc000000: 0x80010,
    	            0xd000000: 0x0,
    	            0xe000000: 0x4010,
    	            0xf000000: 0x40080000,
    	            0x800000: 0x40004000,
    	            0x1800000: 0x84010,
    	            0x2800000: 0x10,
    	            0x3800000: 0x40004010,
    	            0x4800000: 0x40084010,
    	            0x5800000: 0x40000000,
    	            0x6800000: 0x80000,
    	            0x7800000: 0x40080010,
    	            0x8800000: 0x80010,
    	            0x9800000: 0x0,
    	            0xa800000: 0x4000,
    	            0xb800000: 0x40080000,
    	            0xc800000: 0x40000010,
    	            0xd800000: 0x84000,
    	            0xe800000: 0x40084000,
    	            0xf800000: 0x4010,
    	            0x10000000: 0x0,
    	            0x11000000: 0x40080010,
    	            0x12000000: 0x40004010,
    	            0x13000000: 0x40084000,
    	            0x14000000: 0x40080000,
    	            0x15000000: 0x10,
    	            0x16000000: 0x84010,
    	            0x17000000: 0x4000,
    	            0x18000000: 0x4010,
    	            0x19000000: 0x80000,
    	            0x1a000000: 0x80010,
    	            0x1b000000: 0x40000010,
    	            0x1c000000: 0x84000,
    	            0x1d000000: 0x40004000,
    	            0x1e000000: 0x40000000,
    	            0x1f000000: 0x40084010,
    	            0x10800000: 0x84010,
    	            0x11800000: 0x80000,
    	            0x12800000: 0x40080000,
    	            0x13800000: 0x4000,
    	            0x14800000: 0x40004000,
    	            0x15800000: 0x40084010,
    	            0x16800000: 0x10,
    	            0x17800000: 0x40000000,
    	            0x18800000: 0x40084000,
    	            0x19800000: 0x40000010,
    	            0x1a800000: 0x40004010,
    	            0x1b800000: 0x80010,
    	            0x1c800000: 0x0,
    	            0x1d800000: 0x4010,
    	            0x1e800000: 0x40080010,
    	            0x1f800000: 0x84000
    	        },
    	        {
    	            0x0: 0x104,
    	            0x100000: 0x0,
    	            0x200000: 0x4000100,
    	            0x300000: 0x10104,
    	            0x400000: 0x10004,
    	            0x500000: 0x4000004,
    	            0x600000: 0x4010104,
    	            0x700000: 0x4010000,
    	            0x800000: 0x4000000,
    	            0x900000: 0x4010100,
    	            0xa00000: 0x10100,
    	            0xb00000: 0x4010004,
    	            0xc00000: 0x4000104,
    	            0xd00000: 0x10000,
    	            0xe00000: 0x4,
    	            0xf00000: 0x100,
    	            0x80000: 0x4010100,
    	            0x180000: 0x4010004,
    	            0x280000: 0x0,
    	            0x380000: 0x4000100,
    	            0x480000: 0x4000004,
    	            0x580000: 0x10000,
    	            0x680000: 0x10004,
    	            0x780000: 0x104,
    	            0x880000: 0x4,
    	            0x980000: 0x100,
    	            0xa80000: 0x4010000,
    	            0xb80000: 0x10104,
    	            0xc80000: 0x10100,
    	            0xd80000: 0x4000104,
    	            0xe80000: 0x4010104,
    	            0xf80000: 0x4000000,
    	            0x1000000: 0x4010100,
    	            0x1100000: 0x10004,
    	            0x1200000: 0x10000,
    	            0x1300000: 0x4000100,
    	            0x1400000: 0x100,
    	            0x1500000: 0x4010104,
    	            0x1600000: 0x4000004,
    	            0x1700000: 0x0,
    	            0x1800000: 0x4000104,
    	            0x1900000: 0x4000000,
    	            0x1a00000: 0x4,
    	            0x1b00000: 0x10100,
    	            0x1c00000: 0x4010000,
    	            0x1d00000: 0x104,
    	            0x1e00000: 0x10104,
    	            0x1f00000: 0x4010004,
    	            0x1080000: 0x4000000,
    	            0x1180000: 0x104,
    	            0x1280000: 0x4010100,
    	            0x1380000: 0x0,
    	            0x1480000: 0x10004,
    	            0x1580000: 0x4000100,
    	            0x1680000: 0x100,
    	            0x1780000: 0x4010004,
    	            0x1880000: 0x10000,
    	            0x1980000: 0x4010104,
    	            0x1a80000: 0x10104,
    	            0x1b80000: 0x4000004,
    	            0x1c80000: 0x4000104,
    	            0x1d80000: 0x4010000,
    	            0x1e80000: 0x4,
    	            0x1f80000: 0x10100
    	        },
    	        {
    	            0x0: 0x80401000,
    	            0x10000: 0x80001040,
    	            0x20000: 0x401040,
    	            0x30000: 0x80400000,
    	            0x40000: 0x0,
    	            0x50000: 0x401000,
    	            0x60000: 0x80000040,
    	            0x70000: 0x400040,
    	            0x80000: 0x80000000,
    	            0x90000: 0x400000,
    	            0xa0000: 0x40,
    	            0xb0000: 0x80001000,
    	            0xc0000: 0x80400040,
    	            0xd0000: 0x1040,
    	            0xe0000: 0x1000,
    	            0xf0000: 0x80401040,
    	            0x8000: 0x80001040,
    	            0x18000: 0x40,
    	            0x28000: 0x80400040,
    	            0x38000: 0x80001000,
    	            0x48000: 0x401000,
    	            0x58000: 0x80401040,
    	            0x68000: 0x0,
    	            0x78000: 0x80400000,
    	            0x88000: 0x1000,
    	            0x98000: 0x80401000,
    	            0xa8000: 0x400000,
    	            0xb8000: 0x1040,
    	            0xc8000: 0x80000000,
    	            0xd8000: 0x400040,
    	            0xe8000: 0x401040,
    	            0xf8000: 0x80000040,
    	            0x100000: 0x400040,
    	            0x110000: 0x401000,
    	            0x120000: 0x80000040,
    	            0x130000: 0x0,
    	            0x140000: 0x1040,
    	            0x150000: 0x80400040,
    	            0x160000: 0x80401000,
    	            0x170000: 0x80001040,
    	            0x180000: 0x80401040,
    	            0x190000: 0x80000000,
    	            0x1a0000: 0x80400000,
    	            0x1b0000: 0x401040,
    	            0x1c0000: 0x80001000,
    	            0x1d0000: 0x400000,
    	            0x1e0000: 0x40,
    	            0x1f0000: 0x1000,
    	            0x108000: 0x80400000,
    	            0x118000: 0x80401040,
    	            0x128000: 0x0,
    	            0x138000: 0x401000,
    	            0x148000: 0x400040,
    	            0x158000: 0x80000000,
    	            0x168000: 0x80001040,
    	            0x178000: 0x40,
    	            0x188000: 0x80000040,
    	            0x198000: 0x1000,
    	            0x1a8000: 0x80001000,
    	            0x1b8000: 0x80400040,
    	            0x1c8000: 0x1040,
    	            0x1d8000: 0x80401000,
    	            0x1e8000: 0x400000,
    	            0x1f8000: 0x401040
    	        },
    	        {
    	            0x0: 0x80,
    	            0x1000: 0x1040000,
    	            0x2000: 0x40000,
    	            0x3000: 0x20000000,
    	            0x4000: 0x20040080,
    	            0x5000: 0x1000080,
    	            0x6000: 0x21000080,
    	            0x7000: 0x40080,
    	            0x8000: 0x1000000,
    	            0x9000: 0x20040000,
    	            0xa000: 0x20000080,
    	            0xb000: 0x21040080,
    	            0xc000: 0x21040000,
    	            0xd000: 0x0,
    	            0xe000: 0x1040080,
    	            0xf000: 0x21000000,
    	            0x800: 0x1040080,
    	            0x1800: 0x21000080,
    	            0x2800: 0x80,
    	            0x3800: 0x1040000,
    	            0x4800: 0x40000,
    	            0x5800: 0x20040080,
    	            0x6800: 0x21040000,
    	            0x7800: 0x20000000,
    	            0x8800: 0x20040000,
    	            0x9800: 0x0,
    	            0xa800: 0x21040080,
    	            0xb800: 0x1000080,
    	            0xc800: 0x20000080,
    	            0xd800: 0x21000000,
    	            0xe800: 0x1000000,
    	            0xf800: 0x40080,
    	            0x10000: 0x40000,
    	            0x11000: 0x80,
    	            0x12000: 0x20000000,
    	            0x13000: 0x21000080,
    	            0x14000: 0x1000080,
    	            0x15000: 0x21040000,
    	            0x16000: 0x20040080,
    	            0x17000: 0x1000000,
    	            0x18000: 0x21040080,
    	            0x19000: 0x21000000,
    	            0x1a000: 0x1040000,
    	            0x1b000: 0x20040000,
    	            0x1c000: 0x40080,
    	            0x1d000: 0x20000080,
    	            0x1e000: 0x0,
    	            0x1f000: 0x1040080,
    	            0x10800: 0x21000080,
    	            0x11800: 0x1000000,
    	            0x12800: 0x1040000,
    	            0x13800: 0x20040080,
    	            0x14800: 0x20000000,
    	            0x15800: 0x1040080,
    	            0x16800: 0x80,
    	            0x17800: 0x21040000,
    	            0x18800: 0x40080,
    	            0x19800: 0x21040080,
    	            0x1a800: 0x0,
    	            0x1b800: 0x21000000,
    	            0x1c800: 0x1000080,
    	            0x1d800: 0x40000,
    	            0x1e800: 0x20040000,
    	            0x1f800: 0x20000080
    	        },
    	        {
    	            0x0: 0x10000008,
    	            0x100: 0x2000,
    	            0x200: 0x10200000,
    	            0x300: 0x10202008,
    	            0x400: 0x10002000,
    	            0x500: 0x200000,
    	            0x600: 0x200008,
    	            0x700: 0x10000000,
    	            0x800: 0x0,
    	            0x900: 0x10002008,
    	            0xa00: 0x202000,
    	            0xb00: 0x8,
    	            0xc00: 0x10200008,
    	            0xd00: 0x202008,
    	            0xe00: 0x2008,
    	            0xf00: 0x10202000,
    	            0x80: 0x10200000,
    	            0x180: 0x10202008,
    	            0x280: 0x8,
    	            0x380: 0x200000,
    	            0x480: 0x202008,
    	            0x580: 0x10000008,
    	            0x680: 0x10002000,
    	            0x780: 0x2008,
    	            0x880: 0x200008,
    	            0x980: 0x2000,
    	            0xa80: 0x10002008,
    	            0xb80: 0x10200008,
    	            0xc80: 0x0,
    	            0xd80: 0x10202000,
    	            0xe80: 0x202000,
    	            0xf80: 0x10000000,
    	            0x1000: 0x10002000,
    	            0x1100: 0x10200008,
    	            0x1200: 0x10202008,
    	            0x1300: 0x2008,
    	            0x1400: 0x200000,
    	            0x1500: 0x10000000,
    	            0x1600: 0x10000008,
    	            0x1700: 0x202000,
    	            0x1800: 0x202008,
    	            0x1900: 0x0,
    	            0x1a00: 0x8,
    	            0x1b00: 0x10200000,
    	            0x1c00: 0x2000,
    	            0x1d00: 0x10002008,
    	            0x1e00: 0x10202000,
    	            0x1f00: 0x200008,
    	            0x1080: 0x8,
    	            0x1180: 0x202000,
    	            0x1280: 0x200000,
    	            0x1380: 0x10000008,
    	            0x1480: 0x10002000,
    	            0x1580: 0x2008,
    	            0x1680: 0x10202008,
    	            0x1780: 0x10200000,
    	            0x1880: 0x10202000,
    	            0x1980: 0x10200008,
    	            0x1a80: 0x2000,
    	            0x1b80: 0x202008,
    	            0x1c80: 0x200008,
    	            0x1d80: 0x0,
    	            0x1e80: 0x10000000,
    	            0x1f80: 0x10002008
    	        },
    	        {
    	            0x0: 0x100000,
    	            0x10: 0x2000401,
    	            0x20: 0x400,
    	            0x30: 0x100401,
    	            0x40: 0x2100401,
    	            0x50: 0x0,
    	            0x60: 0x1,
    	            0x70: 0x2100001,
    	            0x80: 0x2000400,
    	            0x90: 0x100001,
    	            0xa0: 0x2000001,
    	            0xb0: 0x2100400,
    	            0xc0: 0x2100000,
    	            0xd0: 0x401,
    	            0xe0: 0x100400,
    	            0xf0: 0x2000000,
    	            0x8: 0x2100001,
    	            0x18: 0x0,
    	            0x28: 0x2000401,
    	            0x38: 0x2100400,
    	            0x48: 0x100000,
    	            0x58: 0x2000001,
    	            0x68: 0x2000000,
    	            0x78: 0x401,
    	            0x88: 0x100401,
    	            0x98: 0x2000400,
    	            0xa8: 0x2100000,
    	            0xb8: 0x100001,
    	            0xc8: 0x400,
    	            0xd8: 0x2100401,
    	            0xe8: 0x1,
    	            0xf8: 0x100400,
    	            0x100: 0x2000000,
    	            0x110: 0x100000,
    	            0x120: 0x2000401,
    	            0x130: 0x2100001,
    	            0x140: 0x100001,
    	            0x150: 0x2000400,
    	            0x160: 0x2100400,
    	            0x170: 0x100401,
    	            0x180: 0x401,
    	            0x190: 0x2100401,
    	            0x1a0: 0x100400,
    	            0x1b0: 0x1,
    	            0x1c0: 0x0,
    	            0x1d0: 0x2100000,
    	            0x1e0: 0x2000001,
    	            0x1f0: 0x400,
    	            0x108: 0x100400,
    	            0x118: 0x2000401,
    	            0x128: 0x2100001,
    	            0x138: 0x1,
    	            0x148: 0x2000000,
    	            0x158: 0x100000,
    	            0x168: 0x401,
    	            0x178: 0x2100400,
    	            0x188: 0x2000001,
    	            0x198: 0x2100000,
    	            0x1a8: 0x0,
    	            0x1b8: 0x2100401,
    	            0x1c8: 0x100401,
    	            0x1d8: 0x400,
    	            0x1e8: 0x2000400,
    	            0x1f8: 0x100001
    	        },
    	        {
    	            0x0: 0x8000820,
    	            0x1: 0x20000,
    	            0x2: 0x8000000,
    	            0x3: 0x20,
    	            0x4: 0x20020,
    	            0x5: 0x8020820,
    	            0x6: 0x8020800,
    	            0x7: 0x800,
    	            0x8: 0x8020000,
    	            0x9: 0x8000800,
    	            0xa: 0x20800,
    	            0xb: 0x8020020,
    	            0xc: 0x820,
    	            0xd: 0x0,
    	            0xe: 0x8000020,
    	            0xf: 0x20820,
    	            0x80000000: 0x800,
    	            0x80000001: 0x8020820,
    	            0x80000002: 0x8000820,
    	            0x80000003: 0x8000000,
    	            0x80000004: 0x8020000,
    	            0x80000005: 0x20800,
    	            0x80000006: 0x20820,
    	            0x80000007: 0x20,
    	            0x80000008: 0x8000020,
    	            0x80000009: 0x820,
    	            0x8000000a: 0x20020,
    	            0x8000000b: 0x8020800,
    	            0x8000000c: 0x0,
    	            0x8000000d: 0x8020020,
    	            0x8000000e: 0x8000800,
    	            0x8000000f: 0x20000,
    	            0x10: 0x20820,
    	            0x11: 0x8020800,
    	            0x12: 0x20,
    	            0x13: 0x800,
    	            0x14: 0x8000800,
    	            0x15: 0x8000020,
    	            0x16: 0x8020020,
    	            0x17: 0x20000,
    	            0x18: 0x0,
    	            0x19: 0x20020,
    	            0x1a: 0x8020000,
    	            0x1b: 0x8000820,
    	            0x1c: 0x8020820,
    	            0x1d: 0x20800,
    	            0x1e: 0x820,
    	            0x1f: 0x8000000,
    	            0x80000010: 0x20000,
    	            0x80000011: 0x800,
    	            0x80000012: 0x8020020,
    	            0x80000013: 0x20820,
    	            0x80000014: 0x20,
    	            0x80000015: 0x8020000,
    	            0x80000016: 0x8000000,
    	            0x80000017: 0x8000820,
    	            0x80000018: 0x8020820,
    	            0x80000019: 0x8000020,
    	            0x8000001a: 0x8000800,
    	            0x8000001b: 0x0,
    	            0x8000001c: 0x20800,
    	            0x8000001d: 0x820,
    	            0x8000001e: 0x20020,
    	            0x8000001f: 0x8020800
    	        }
    	    ];
    
    	    // Masks that select the SBOX input
    	    var SBOX_MASK = [
    	        0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
    	        0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
    	    ];
    
    	    /**
    	     * DES block cipher algorithm.
    	     */
    	    var DES = C_algo.DES = BlockCipher.extend({
    	        _doReset: function () {
    	            // Shortcuts
    	            var key = this._key;
    	            var keyWords = key.words;
    
    	            // Select 56 bits according to PC1
    	            var keyBits = [];
    	            for (var i = 0; i < 56; i++) {
    	                var keyBitPos = PC1[i] - 1;
    	                keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;
    	            }
    
    	            // Assemble 16 subkeys
    	            var subKeys = this._subKeys = [];
    	            for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
    	                // Create subkey
    	                var subKey = subKeys[nSubKey] = [];
    
    	                // Shortcut
    	                var bitShift = BIT_SHIFTS[nSubKey];
    
    	                // Select 48 bits according to PC2
    	                for (var i = 0; i < 24; i++) {
    	                    // Select from the left 28 key bits
    	                    subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);
    
    	                    // Select from the right 28 key bits
    	                    subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);
    	                }
    
    	                // Since each subkey is applied to an expanded 32-bit input,
    	                // the subkey can be broken into 8 values scaled to 32-bits,
    	                // which allows the key to be used without expansion
    	                subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);
    	                for (var i = 1; i < 7; i++) {
    	                    subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);
    	                }
    	                subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);
    	            }
    
    	            // Compute inverse subkeys
    	            var invSubKeys = this._invSubKeys = [];
    	            for (var i = 0; i < 16; i++) {
    	                invSubKeys[i] = subKeys[15 - i];
    	            }
    	        },
    
    	        encryptBlock: function (M, offset) {
    	            this._doCryptBlock(M, offset, this._subKeys);
    	        },
    
    	        decryptBlock: function (M, offset) {
    	            this._doCryptBlock(M, offset, this._invSubKeys);
    	        },
    
    	        _doCryptBlock: function (M, offset, subKeys) {
    	            // Get input
    	            this._lBlock = M[offset];
    	            this._rBlock = M[offset + 1];
    
    	            // Initial permutation
    	            exchangeLR.call(this, 4,  0x0f0f0f0f);
    	            exchangeLR.call(this, 16, 0x0000ffff);
    	            exchangeRL.call(this, 2,  0x33333333);
    	            exchangeRL.call(this, 8,  0x00ff00ff);
    	            exchangeLR.call(this, 1,  0x55555555);
    
    	            // Rounds
    	            for (var round = 0; round < 16; round++) {
    	                // Shortcuts
    	                var subKey = subKeys[round];
    	                var lBlock = this._lBlock;
    	                var rBlock = this._rBlock;
    
    	                // Feistel function
    	                var f = 0;
    	                for (var i = 0; i < 8; i++) {
    	                    f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
    	                }
    	                this._lBlock = rBlock;
    	                this._rBlock = lBlock ^ f;
    	            }
    
    	            // Undo swap from last round
    	            var t = this._lBlock;
    	            this._lBlock = this._rBlock;
    	            this._rBlock = t;
    
    	            // Final permutation
    	            exchangeLR.call(this, 1,  0x55555555);
    	            exchangeRL.call(this, 8,  0x00ff00ff);
    	            exchangeRL.call(this, 2,  0x33333333);
    	            exchangeLR.call(this, 16, 0x0000ffff);
    	            exchangeLR.call(this, 4,  0x0f0f0f0f);
    
    	            // Set output
    	            M[offset] = this._lBlock;
    	            M[offset + 1] = this._rBlock;
    	        },
    
    	        keySize: 64/32,
    
    	        ivSize: 64/32,
    
    	        blockSize: 64/32
    	    });
    
    	    // Swap bits across the left and right words
    	    function exchangeLR(offset, mask) {
    	        var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;
    	        this._rBlock ^= t;
    	        this._lBlock ^= t << offset;
    	    }
    
    	    function exchangeRL(offset, mask) {
    	        var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;
    	        this._lBlock ^= t;
    	        this._rBlock ^= t << offset;
    	    }
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.DES.decrypt(ciphertext, key, cfg);
    	     */
    	    C.DES = BlockCipher._createHelper(DES);
    
    	    /**
    	     * Triple-DES block cipher algorithm.
    	     */
    	    var TripleDES = C_algo.TripleDES = BlockCipher.extend({
    	        _doReset: function () {
    	            // Shortcuts
    	            var key = this._key;
    	            var keyWords = key.words;
    
    	            // Create DES instances
    	            this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2)));
    	            this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4)));
    	            this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6)));
    	        },
    
    	        encryptBlock: function (M, offset) {
    	            this._des1.encryptBlock(M, offset);
    	            this._des2.decryptBlock(M, offset);
    	            this._des3.encryptBlock(M, offset);
    	        },
    
    	        decryptBlock: function (M, offset) {
    	            this._des3.decryptBlock(M, offset);
    	            this._des2.encryptBlock(M, offset);
    	            this._des1.decryptBlock(M, offset);
    	        },
    
    	        keySize: 192/32,
    
    	        ivSize: 64/32,
    
    	        blockSize: 64/32
    	    });
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
    	     */
    	    C.TripleDES = BlockCipher._createHelper(TripleDES);
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var StreamCipher = C_lib.StreamCipher;
    	    var C_algo = C.algo;
    
    	    /**
    	     * RC4 stream cipher algorithm.
    	     */
    	    var RC4 = C_algo.RC4 = StreamCipher.extend({
    	        _doReset: function () {
    	            // Shortcuts
    	            var key = this._key;
    	            var keyWords = key.words;
    	            var keySigBytes = key.sigBytes;
    
    	            // Init sbox
    	            var S = this._S = [];
    	            for (var i = 0; i < 256; i++) {
    	                S[i] = i;
    	            }
    
    	            // Key setup
    	            for (var i = 0, j = 0; i < 256; i++) {
    	                var keyByteIndex = i % keySigBytes;
    	                var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;
    
    	                j = (j + S[i] + keyByte) % 256;
    
    	                // Swap
    	                var t = S[i];
    	                S[i] = S[j];
    	                S[j] = t;
    	            }
    
    	            // Counters
    	            this._i = this._j = 0;
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            M[offset] ^= generateKeystreamWord.call(this);
    	        },
    
    	        keySize: 256/32,
    
    	        ivSize: 0
    	    });
    
    	    function generateKeystreamWord() {
    	        // Shortcuts
    	        var S = this._S;
    	        var i = this._i;
    	        var j = this._j;
    
    	        // Generate keystream word
    	        var keystreamWord = 0;
    	        for (var n = 0; n < 4; n++) {
    	            i = (i + 1) % 256;
    	            j = (j + S[i]) % 256;
    
    	            // Swap
    	            var t = S[i];
    	            S[i] = S[j];
    	            S[j] = t;
    
    	            keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);
    	        }
    
    	        // Update counters
    	        this._i = i;
    	        this._j = j;
    
    	        return keystreamWord;
    	    }
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
    	     */
    	    C.RC4 = StreamCipher._createHelper(RC4);
    
    	    /**
    	     * Modified RC4 stream cipher algorithm.
    	     */
    	    var RC4Drop = C_algo.RC4Drop = RC4.extend({
    	        /**
    	         * Configuration options.
    	         *
    	         * @property {number} drop The number of keystream words to drop. Default 192
    	         */
    	        cfg: RC4.cfg.extend({
    	            drop: 192
    	        }),
    
    	        _doReset: function () {
    	            RC4._doReset.call(this);
    
    	            // Drop
    	            for (var i = this.cfg.drop; i > 0; i--) {
    	                generateKeystreamWord.call(this);
    	            }
    	        }
    	    });
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
    	     */
    	    C.RC4Drop = StreamCipher._createHelper(RC4Drop);
    	}());
    
    
    	/** @preserve
    	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
    	 * derived from CryptoJS.mode.CTR
    	 * Jan Hruby jhruby.web@gmail.com
    	 */
    	CryptoJS.mode.CTRGladman = (function () {
    	    var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
    
    		function incWord(word)
    		{
    			if (((word >> 24) & 0xff) === 0xff) { //overflow
    			var b1 = (word >> 16)&0xff;
    			var b2 = (word >> 8)&0xff;
    			var b3 = word & 0xff;
    
    			if (b1 === 0xff) // overflow b1
    			{
    			b1 = 0;
    			if (b2 === 0xff)
    			{
    				b2 = 0;
    				if (b3 === 0xff)
    				{
    					b3 = 0;
    				}
    				else
    				{
    					++b3;
    				}
    			}
    			else
    			{
    				++b2;
    			}
    			}
    			else
    			{
    			++b1;
    			}
    
    			word = 0;
    			word += (b1 << 16);
    			word += (b2 << 8);
    			word += b3;
    			}
    			else
    			{
    			word += (0x01 << 24);
    			}
    			return word;
    		}
    
    		function incCounter(counter)
    		{
    			if ((counter[0] = incWord(counter[0])) === 0)
    			{
    				// encr_data in fileenc.c from  Dr Brian Gladman's counts only with DWORD j < 8
    				counter[1] = incWord(counter[1]);
    			}
    			return counter;
    		}
    
    	    var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
    	        processBlock: function (words, offset) {
    	            // Shortcuts
    	            var cipher = this._cipher
    	            var blockSize = cipher.blockSize;
    	            var iv = this._iv;
    	            var counter = this._counter;
    
    	            // Generate keystream
    	            if (iv) {
    	                counter = this._counter = iv.slice(0);
    
    	                // Remove IV for subsequent blocks
    	                this._iv = undefined;
    	            }
    
    				incCounter(counter);
    
    				var keystream = counter.slice(0);
    	            cipher.encryptBlock(keystream, 0);
    
    	            // Encrypt
    	            for (var i = 0; i < blockSize; i++) {
    	                words[offset + i] ^= keystream[i];
    	            }
    	        }
    	    });
    
    	    CTRGladman.Decryptor = Encryptor;
    
    	    return CTRGladman;
    	}());
    
    
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var StreamCipher = C_lib.StreamCipher;
    	    var C_algo = C.algo;
    
    	    // Reusable objects
    	    var S  = [];
    	    var C_ = [];
    	    var G  = [];
    
    	    /**
    	     * Rabbit stream cipher algorithm
    	     */
    	    var Rabbit = C_algo.Rabbit = StreamCipher.extend({
    	        _doReset: function () {
    	            // Shortcuts
    	            var K = this._key.words;
    	            var iv = this.cfg.iv;
    
    	            // Swap endian
    	            for (var i = 0; i < 4; i++) {
    	                K[i] = (((K[i] << 8)  | (K[i] >>> 24)) & 0x00ff00ff) |
    	                       (((K[i] << 24) | (K[i] >>> 8))  & 0xff00ff00);
    	            }
    
    	            // Generate initial state values
    	            var X = this._X = [
    	                K[0], (K[3] << 16) | (K[2] >>> 16),
    	                K[1], (K[0] << 16) | (K[3] >>> 16),
    	                K[2], (K[1] << 16) | (K[0] >>> 16),
    	                K[3], (K[2] << 16) | (K[1] >>> 16)
    	            ];
    
    	            // Generate initial counter values
    	            var C = this._C = [
    	                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
    	                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
    	                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
    	                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
    	            ];
    
    	            // Carry bit
    	            this._b = 0;
    
    	            // Iterate the system four times
    	            for (var i = 0; i < 4; i++) {
    	                nextState.call(this);
    	            }
    
    	            // Modify the counters
    	            for (var i = 0; i < 8; i++) {
    	                C[i] ^= X[(i + 4) & 7];
    	            }
    
    	            // IV setup
    	            if (iv) {
    	                // Shortcuts
    	                var IV = iv.words;
    	                var IV_0 = IV[0];
    	                var IV_1 = IV[1];
    
    	                // Generate four subvectors
    	                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
    	                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
    	                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
    	                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);
    
    	                // Modify counter values
    	                C[0] ^= i0;
    	                C[1] ^= i1;
    	                C[2] ^= i2;
    	                C[3] ^= i3;
    	                C[4] ^= i0;
    	                C[5] ^= i1;
    	                C[6] ^= i2;
    	                C[7] ^= i3;
    
    	                // Iterate the system four times
    	                for (var i = 0; i < 4; i++) {
    	                    nextState.call(this);
    	                }
    	            }
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcut
    	            var X = this._X;
    
    	            // Iterate the system
    	            nextState.call(this);
    
    	            // Generate four keystream words
    	            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
    	            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
    	            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
    	            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
    
    	            for (var i = 0; i < 4; i++) {
    	                // Swap endian
    	                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |
    	                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);
    
    	                // Encrypt
    	                M[offset + i] ^= S[i];
    	            }
    	        },
    
    	        blockSize: 128/32,
    
    	        ivSize: 64/32
    	    });
    
    	    function nextState() {
    	        // Shortcuts
    	        var X = this._X;
    	        var C = this._C;
    
    	        // Save old counter values
    	        for (var i = 0; i < 8; i++) {
    	            C_[i] = C[i];
    	        }
    
    	        // Calculate new counter values
    	        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
    	        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
    	        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
    	        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
    	        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
    	        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
    	        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
    	        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
    	        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
    
    	        // Calculate the g-values
    	        for (var i = 0; i < 8; i++) {
    	            var gx = X[i] + C[i];
    
    	            // Construct high and low argument for squaring
    	            var ga = gx & 0xffff;
    	            var gb = gx >>> 16;
    
    	            // Calculate high and low result of squaring
    	            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
    	            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
    
    	            // High XOR low
    	            G[i] = gh ^ gl;
    	        }
    
    	        // Calculate new state values
    	        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
    	        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;
    	        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
    	        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;
    	        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
    	        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;
    	        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
    	        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;
    	    }
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
    	     */
    	    C.Rabbit = StreamCipher._createHelper(Rabbit);
    	}());
    
    
    	/**
    	 * Counter block mode.
    	 */
    	CryptoJS.mode.CTR = (function () {
    	    var CTR = CryptoJS.lib.BlockCipherMode.extend();
    
    	    var Encryptor = CTR.Encryptor = CTR.extend({
    	        processBlock: function (words, offset) {
    	            // Shortcuts
    	            var cipher = this._cipher
    	            var blockSize = cipher.blockSize;
    	            var iv = this._iv;
    	            var counter = this._counter;
    
    	            // Generate keystream
    	            if (iv) {
    	                counter = this._counter = iv.slice(0);
    
    	                // Remove IV for subsequent blocks
    	                this._iv = undefined;
    	            }
    	            var keystream = counter.slice(0);
    	            cipher.encryptBlock(keystream, 0);
    
    	            // Increment counter
    	            counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0
    
    	            // Encrypt
    	            for (var i = 0; i < blockSize; i++) {
    	                words[offset + i] ^= keystream[i];
    	            }
    	        }
    	    });
    
    	    CTR.Decryptor = Encryptor;
    
    	    return CTR;
    	}());
    
    
    	(function () {
    	    // Shortcuts
    	    var C = CryptoJS;
    	    var C_lib = C.lib;
    	    var StreamCipher = C_lib.StreamCipher;
    	    var C_algo = C.algo;
    
    	    // Reusable objects
    	    var S  = [];
    	    var C_ = [];
    	    var G  = [];
    
    	    /**
    	     * Rabbit stream cipher algorithm.
    	     *
    	     * This is a legacy version that neglected to convert the key to little-endian.
    	     * This error doesn't affect the cipher's security,
    	     * but it does affect its compatibility with other implementations.
    	     */
    	    var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
    	        _doReset: function () {
    	            // Shortcuts
    	            var K = this._key.words;
    	            var iv = this.cfg.iv;
    
    	            // Generate initial state values
    	            var X = this._X = [
    	                K[0], (K[3] << 16) | (K[2] >>> 16),
    	                K[1], (K[0] << 16) | (K[3] >>> 16),
    	                K[2], (K[1] << 16) | (K[0] >>> 16),
    	                K[3], (K[2] << 16) | (K[1] >>> 16)
    	            ];
    
    	            // Generate initial counter values
    	            var C = this._C = [
    	                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
    	                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
    	                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
    	                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
    	            ];
    
    	            // Carry bit
    	            this._b = 0;
    
    	            // Iterate the system four times
    	            for (var i = 0; i < 4; i++) {
    	                nextState.call(this);
    	            }
    
    	            // Modify the counters
    	            for (var i = 0; i < 8; i++) {
    	                C[i] ^= X[(i + 4) & 7];
    	            }
    
    	            // IV setup
    	            if (iv) {
    	                // Shortcuts
    	                var IV = iv.words;
    	                var IV_0 = IV[0];
    	                var IV_1 = IV[1];
    
    	                // Generate four subvectors
    	                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
    	                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
    	                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
    	                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);
    
    	                // Modify counter values
    	                C[0] ^= i0;
    	                C[1] ^= i1;
    	                C[2] ^= i2;
    	                C[3] ^= i3;
    	                C[4] ^= i0;
    	                C[5] ^= i1;
    	                C[6] ^= i2;
    	                C[7] ^= i3;
    
    	                // Iterate the system four times
    	                for (var i = 0; i < 4; i++) {
    	                    nextState.call(this);
    	                }
    	            }
    	        },
    
    	        _doProcessBlock: function (M, offset) {
    	            // Shortcut
    	            var X = this._X;
    
    	            // Iterate the system
    	            nextState.call(this);
    
    	            // Generate four keystream words
    	            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
    	            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
    	            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
    	            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
    
    	            for (var i = 0; i < 4; i++) {
    	                // Swap endian
    	                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |
    	                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);
    
    	                // Encrypt
    	                M[offset + i] ^= S[i];
    	            }
    	        },
    
    	        blockSize: 128/32,
    
    	        ivSize: 64/32
    	    });
    
    	    function nextState() {
    	        // Shortcuts
    	        var X = this._X;
    	        var C = this._C;
    
    	        // Save old counter values
    	        for (var i = 0; i < 8; i++) {
    	            C_[i] = C[i];
    	        }
    
    	        // Calculate new counter values
    	        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
    	        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
    	        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
    	        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
    	        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
    	        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
    	        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
    	        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
    	        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
    
    	        // Calculate the g-values
    	        for (var i = 0; i < 8; i++) {
    	            var gx = X[i] + C[i];
    
    	            // Construct high and low argument for squaring
    	            var ga = gx & 0xffff;
    	            var gb = gx >>> 16;
    
    	            // Calculate high and low result of squaring
    	            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
    	            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
    
    	            // High XOR low
    	            G[i] = gh ^ gl;
    	        }
    
    	        // Calculate new state values
    	        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
    	        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;
    	        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
    	        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;
    	        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
    	        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;
    	        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
    	        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;
    	    }
    
    	    /**
    	     * Shortcut functions to the cipher's object interface.
    	     *
    	     * @example
    	     *
    	     *     var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
    	     *     var plaintext  = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
    	     */
    	    C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
    	}());
    
    
    	/**
    	 * Zero padding strategy.
    	 */
    	CryptoJS.pad.ZeroPadding = {
    	    pad: function (data, blockSize) {
    	        // Shortcut
    	        var blockSizeBytes = blockSize * 4;
    
    	        // Pad
    	        data.clamp();
    	        data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);
    	    },
    
    	    unpad: function (data) {
    	        // Shortcut
    	        var dataWords = data.words;
    
    	        // Unpad
    	        var i = data.sigBytes - 1;
    	        while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {
    	            i--;
    	        }
    	        data.sigBytes = i + 1;
    	    }
    	};
    
    
    	return CryptoJS;
    
    }));
    
    

    external by artiomchi  771  0  3  0

    Small test that shows a bug in the crypto-js library, when used in Mac OS X, Safari 6

    Small test that shows a bug in the crypto-js library, when used in Mac OS X, Safari 6: testCrypto.html
    <html>
    <head>
    	<meta charset="utf-8">
    	<script type="text/javascript">
    
    		var BSeed = [109,198,182,214,76,65,92,201,96,30,77,82,22,38,127,144,66,220,135,226,199,188,185,224,68,72,86,200,207,89,236,132,118,240,224,214,210,71,46,165,72,72,241,136,190,48,103,38,243,175,82,65,130,140,34,108,55,87,63,222,169,168,3,44,50,22,113,202,64,182,166,124,123,89,209,193,176,176,107,24,50,80,85,139,75,215,173,132,113,63,23,150,242,240,195,13,143,244,101,214,118,20,220,192,241,156,151,181,88,121,122,44,162,249,239,79,120,28,232,34,57,72,155,52,152,61,196,108,176,218,165,122,184,57,144,172,232,28,8,58,24,155,56,36,215,137,41,196,115,107,181,106,104,22,249,1,110,22,2,124,247,79,110,172,231,210,172,231,170,217,171,145,42,233,100,97,15,74,197,76,192,160,139,151,27,148,235,71,131,142,92,13,236,145,165,251,149,155,149,73,232,145,247,152,141,191,90,170,5,170,126,247,37,45,62,59,76,72,23,150,202,182,80,168,255,123,204,71,151,56,166,197,65,31,46,23,165,250,153,246,242,140,12,32,244,100,117,67,45,187,174,211,80,214,104,97,70,22,94,7,191,86,3,242,23,203,153,120,144,168,187,70,112,80,90,177,109,182,155,165,175,32,33,52,217,150,156,86,160,38,230,24,165,16,18,154,138,15,70,167,25,231,171,146,140,108,200,55,242,97,130,3,120,17,24,33,191,110,42,254,127,236,227,131,249,43,173,236,112,149,170,164,234,13,64,142,166,116,138,246,89,226,174,211,65,151,57,56,34,174,234,185,41,163,55,16,53,200,168,92,179,148,133,79,0,171,242,111,209,157,26,14,156,86,10,160,174,129,152,164,221,24,20,118,234,37,134,208,102,62,113,182,36,6,61,175,169,239,87,74,103,12,82,247,80,247,216,93,196,229,181,242,103,237,127,176,128,27,17,60,68,253,16,245,131,96,2,113,66,112,76,254,186,213,198,146,207,60,94,128,165,9,50,81,75,213,144,155,66,211,125,163,201,42,62,115,120,29,29,176,75,234,96,92,124,123,39,33,218,99,24,35,106,134,58,68,58,131,247,223,129,127,117,58,247,202,245,3,152,218,203,181,213,4,55,133,73,148,185,240,35,69,46,164,31,32,219,229,22,110,27,251,184,87,67,251,58,4,183,75,242,145,205,81,75,120,154,233,240,241,189,18,108,132,177,165,240,126,107,197,168,249,41,222,111,8,234,16,36,104,161,157,83,124,72,184,233,54,79,241,81,150,142,40,89,133,101,155,98,253,135,135,204,86,51,193,252,103,130,219,6,219,237,225,233,144,175,26,88,120,118,96,198,4,7,184,234,95,231,248,1,188,146,29,221,246,219,99,8,197,67,233,38,107,78,212,76,227,37,200,39,111,233,171,115,250,92,121,221,204,187,183,239,249,230,181,119,165,10,91,80,191,225,136,128,166,227,187,248,20,119,128,91,58,58,7,50,106,92,144,249,189,122,126,191,140,119,28,108,12,144,93,138,190,250,160,59,177,195,58,234,120,33,235,164,185,20,227,125,217,170,117,71,215,169,238,241,36,2,207,173,254,90,64,189,51,59,36,50,208,227,159,28,87,118,255,23,157,114,91,50,218,99,192,32,34,153,156,94,190,127,16,244,122,43,60,126,217,189,15,243,59,240,46,17,54,176,131,240,180,157,10,173,32,43,220,156,228,191,14,18,177,233,36,37,68,242,149,162,50,107,231,50,141,32,178,210,102,59,154,119,26,115,149,93,217,192,65,254,90,212,167,89,127,175,37,11,74,111,191,64,80,251,153,24,30,44,95,178,29,9,189,57,225,100,247,144,195,96,224,184,215,254,60,67,18,200,77,81,96,83,38,29,56,64,215,41,2,196,216,238,178,168,105,165,116,210,131,24,116,19,249,206,164,185,191,86,195,130,137,20,17,197,247,0,179,130,202,24,75,136,214,79,247,191,246,251,103,75,92,192,180,237,188,87,23,237,255,138,223,13,203,27,18,16,51,21,30,80,203,165,28,160,167,150,232,56,199,10,194,65,109,97,172,248,230,190,241,216,219,249,249,155,64,35,12,39,36,5,96,174,170,244,234,175,107,45,254,28,2,95,37,50,177,128,45,67,201,141,124,25,200,32,220,246,153,201,90,156,207,128,247,106,97,232,238,71,127,167,4,3,45,162,117,157,149,253,129,35,242,235,222,191,189,65,219,157,244,168,251,15,36,52,103,166,156,159,245,230,88,62,179,243,161,205,227,30,179,14,68,176,245,160,232,0,94,237,174,102,152,48,26,189,149,45,42,78,24,145,82,73,8,52,85,189,234,197,79,107,136,70,3,113,166,32,145,19,165,251,3,130,166,110,18,152,188,228,58,159,252,196,235,138,83,31,206,151,221,238,223,224,44,128,148,42,95,16,128,106,160,37,128,65,221,9,6,205,64,249,106,64,199,130,210,237,194,202,97,97,102,186,168,152,231,47,73,222,109,17,218,6,236,237,15,192,172,34,202,159,99,57,153,143,42,170,196,233,176,51,9,162,189,121,128,212,230,168,116,155,212,128,221,38,138,202,199,66,223,137,194,105,134,64,229,21,141,178,202,243,210,60,43,36,73,104,213,32,43,150,113,165,162,122,135,6,253,94,147,160,151,208,95,202,139,97,188,46,73,197,75,48,2,1,123,171,14,154,145,177,88,249,40,138,51,43,120,194,35,234,212,99,222,94,129,125,26,32,15,216,0,100,41,46,39,215,213,143,29,94,26,16,171,197,206,235,72,218,93,127,174,123,159,122,87,175,236,76,185,136,122,231,151,194,9,136,135,21,204,240,57,229,129,217,87,123,182,31,93,138,153,136,135,195,118,110,219,62,155,10,114,19,227,37,190,235,3,174,194,95,134,142,216,159,218,219,23,12,84,77,54,122,49,215,211,29,66,137,47,48,11,232,40,27,222,27,198,103,21,35,192,111,183,137,97,253,112,21,245,79,164,39,55,21,15,148,186,120,67,157,227,47,242,2,53,132,139,236,170,74,192,48,83,24,100,85,101,73,90,211,134,228,228,96,112,180,27,110,182,172,95,27,28,102,109,232,118,246,129,225,185,162,69,22,17,233,247,5,67,155,101,93,53,85,222,120,218,54,81,20,177,223,75,168,119,163,127,94,81,171,251,124,123,254,204,157,46,89,109,116,180,192,54,25,215,76,171,72,92,150,102,62,170,63,238,75,48,236,46,77,218,232,204,54,191,127,132,137,7,13,231,46,194,56,220,5,184,109,47,75,136,232,215,70,48,154,216,161,179,251,180,97,77,212,117,219,33,173,181,26,24,64,50,40,79,83,194,127,200,160,235,34,144,243,252,165,28,76,229,219,223,93,186,113,228,157,155,69,244,177,235,63,114,28,160,11,222,92,219,39,162,118,223,91,43,184,192,131,124,54,77,98,231,95,94,118,104,240,189,126,249,191,39,162,240,27,94,253,145,173,201,158,217,10,37,139,3,186,31,238,48,16,174,159,28,152,188,53,157,178,52,163,6,23,240,85,143,174,188,46,97,25,171,26,39,115,211,61,119,31,118,45,156,168,184,182,62,79,120,63,226,18,229,168,60,230,99,62,16,143,7,40,92,82,92,135,145,132,75,82,152,111,74,244,111,144,117,151,106,220,24,136,73,91,158,189,188,33,127,216,34,234,72,4,41,42,137,251,5,209,77,87,255,126,16,210,19,94,223,2,84,86,108,183,112,22,60,30,241,91,153,13,83,41,36,158,67,6,160,103,153,33,179,104,69,188,129,106,49,102,53,101,236,119,41,27,210,50,37,164,187,161,122,253,241,136,42,19,181,186,193,39,177,108,255,204,14,233,171,166,2,178,82,10,154,98,117,77,138,239,254,125,131,107,250,72,125,22,123,9,192,112,12,28,110,12,8,228,251,8,56,42,162,46,144,97,28,122,66,221,100,49,184,22,148,123,166,240,51,129,79,164,134,71,92,254,66,139,25,163,141,46,238,31,104,75,137,123,243,178,48,112,10,89,98,225,89,23,138,139,148,82,231,99,179,173,142,59,72,132,255,216,12,1,53,166,133,251,234,39,97,142,108,226,236,89,62,16,173,145,187,38,179,78,132,120,156,144,166,30,18,5,21,183,209,249,219,221,155,71,180,143,76,165,48,181,202,36,142,134,6,160,38,119,227,109,253,167,23,253,35,136,85,124,157,51,233,43,136,74,147,235,233,130,131,248,111,221,159,154,61,51,130,73,182,171,205,15,234,94,71,154,49,160,0,33,99,57,244,99,27,252,129,70,232,16,135,209,193,46,169,36,128,47,150,34,174,248,37,23,238,251,133,183,193,38,93,101,1,236,79,44,142,128,25,230,207,30,97,196,183,14,19,68,9,219,211,116,142,182,251,66,154,59,236,105,6,153,226,94,0,46,95,132,200,36,85,84,175,44,81,186,106,38,236,110,55,131,245,55,238,10,249,236,250,234,142,120,233,32,194,178,121,42,207,21,182,145,230,21,175,208,203,133,246,238,127,213,188,90,36,193,130,134,222,153,2,125,58,174,136,130,181,217,66,250,239,71,16,132,74,214,19,216,53,90,243,233,203,197,141,125,67,50,173,231,46,37,218,91,101,231,93,228,92,113,244,250,30,185,133,101,255,64,231,65,65,127,5,61,35,185,7,188,140,138,146,144,71,179,128,129,145,53,45,147,101,225,97,21,117,152,109,36,7,58,65,15,222,77,147,189,186,190,95,184,226,69,39,86,244,142,142,203,13,99,44,45,71,23,138,129,24,117,97,151,243,236,65,181,133,71,106,162,129,129,77,95,203,7,46,206,252,91,57,112,198,91,78,61,68,34,218,156,12,104,179,60,190,17,190,21,66,96,241,187,144,157,107,129,91,109,194,225,0,62,230,238,161,53,144,9,212,156,152,11,94,132,97,238,38,14,176,126,32,63,174,198,254,148,177,231,201,119,9,58,105,99,219,117,219,52,229,244,60,5,19,226,225,56,227,24,2,227,177,221,56,206,138,66,233,136,217,80,41,192,228,117,73,239,253,87,144,88,197,153,118,0,235,131,99,162,88,242,46,117,94,5,121,19,33,51,191,248,236,206,189,223,240,15,32,49,243,203,144,149,95,216,190,105,174,41,18,7,132,42,55,121,125,252,84,88,169,61,37,69,105,126,29,200,180,244,30,151,132,177,126,189,112,239,249,54,180,33,189,17,158,100,138,84,33,250,253,154,171,182,198,103,210,223,4,254,204,199,31,16,10,113,17,46,244,239,118,149,194,247,65,203,137,48,200,49,59,62,202,199,31,106,118,159,202,57,141,72,69,180,7,13,210,141,64,138,253,175,228,74,27,132,205,229,123,235,16,146,107,116,80,252,149,189,172,101,61,254,60,91,123,197,142,16,194,42,233,164,230,240,61,242,11,37,184,138,130,84,227,71,198,25,234,123,64,191,113,97,116,200,155,136,56,173,104,110,125,219,183,239,207,125,35,37,224,116,94,157,104,170,221,241,92,33,178,225,60,173,3,239,232,24,227,74,61,7,255,101,230,26,117,20,111,237,82,167,105,125,173,176,201,87,85,49,59,140,155,212,231,213,237,57,24,224,218,203,103,160,118,17,58,94,45,28,61,102,71,108,149,116,75,173,71,123,220,129,88,11,223,248,192,89,19,64,150,135,86,33,151,165,148,128,206,142,66,124,14,49,252,24,126,3,231,239,179,200,36,143,203,18,236,145,6,77,86,181,34,228,146,107,203,87,204,15,167,85,143,132,161,227,195,159,233,81,245,28,118,2,121,225,198,14,114,202,247,247,104,70,170,27,36,102,209,146,175,51,152,62,152,190,147,226,101,16,172,157,156,47,136,187,45,42,128,217,223,206,45,144,207,47,154,205,230,213,64,142,203,132,58,175,177,157,219,184,115,93,32,47,164,60,231,208,241,124,36,75,62,132,36,23,211,118,251,18,198,75,196,89,44,162,123,93,49,7,109,59,11,158,20,106,235,115,228,133,67,71,14,42,161,220,182,139,168,112,134,68,100,54,126,104,230,114,225,155,112,231,216,188,147,95,193,14,54,57,91,186,43,38,129,246,55,160,158,39,219,37,103,5,101,120,148,114,36,251,108,30,154,239,168,251,51,253,52,156,252,63,252,231,154,58,40,198,177,236,223,130,250,111,139,58,72,132,240,152,54,54,83,108,219,188,181,180,113,201,232,54,20,56,89,109,178,71,149,35,60,171,35,117,212,189,241,97,33,136,158,49,217,24,23,93,30,10,77,114,255,250,3,220,221,182,155,210,140,93,188,91,73,71,99,37,129,203,15,74,251,154,29,9,67,243,155,81,57,59,57,169,170,81,139,112,250,208,155,173,129,215,79,228,164,146,47,28,251,47,132,75,252,159,164,194,102,115,188,160,38,248,224,249,161,6,200,38,226,177,120,130,71,250,17,167,190,135,231,172,226,161,152,93,246,184,120,98,13,181,96,97,38,4,94,130,71,210,185,247,63,174,140,41,252,75,88,4,118,207,247,131,231,7,58,181,25,143,39,230,39,116,170,75,8,129,195,86,54,211,48,29,14,69,136,154,3,53,86,243,16,121,146,58,239,153,33,100,73,74,53,18,18,165,105,109,237,224,57,244,81,121,93,45,149,32,70,74,71,185,93,104,67,125,2,154,251,14,229,149,169,64,196,30,26,176,140,252,79,180,186,15,197,178,2,203,231,203,177,10,98,114,231,75,248,21,231,57,155,198,53,86,178,37,10,59,40,121,179,20,90,75,134,135,166,104,216,156,97,133,152,161,49,10,106,158,86,73,166,163,78,145,208,114,26,168,159,75,176,64,8,13,110,40,95,225,130,72,211,91,45,228,201,1,9,107,211,160,212,45,117,125,19,49,145,101,252,163,81,217,159,107,182,126,246,153,105,99,98,181,23,10,168,99,217,244,122,43,167,163,6,18,171,197,202,19,91,152,126,251,180,20,175,213,84,208,112,110,1,222,194,115,200,39,163,152,80,105,75,240,159,135,231,190,155,52,241,46,215,34,229,110,11,38,142,208,61,83,119,161,8,153,28,230,162,180,26,175,182,184,169,93,250,5,190,140,219,155,15,190,22,67,137,218,11,96,181,152,55,41,179,230,207,199,8,231,11,94,90,182,233,189,207,192,204,111,60,130,93,230,138,74,189,148,89,4,138,31,29,152,21,9,208,14,181,114,239,103,73,134,33,125,132,165,218,235,242,245,213,156,94,84,209,227,60,221,27,50,193,204,155,54,240,103,12,56,26,112,153,45,112,219,189,147,106,194,170,131,46,241,3,67,32,54,130,167,224,57,125,144,38,35,231,246,73,68,71,133,195,200,42,77,249,45,47,142,248,245,84,178,218,46,231,181,109,156,63,249,105,14,120,25,123,152,134,14,138,111,168,13,81,36,93,117,0,38,136,167,200,235,103,69,93,114,221,44,232,180,41,171,44,207,63,147,63,93,168,131,113,201,137,186,101,175,226,201,189,121,59,79,13,66,163,39,93,118,88,121,103,123,239,168,204,161,80,188,142,69,4,102,100,138,148,239,104,160,153,198,81,24,28,211,43,71,80,85,154,9,254,134,144,81,202,39,156,207,117,119,29,9,190,46,99,89,205,93,242,60,28,255,113,243,140,112,193,84,99,247,58,79,201,2,143,206,78,8,119,47,179,198,233,27,56,139,151,6,99,144,50,156,121,186,118,97,63,87,162,44,216,31,105,38,185,171,206,171,139,56,12,73,113,118,89,149,152,74,229,223,72,52,36,186,171,86,91,184,3,106,214,255,122,170,212,246,191,182,253,34,7,169,59,27,226,156,191,100,59,186,129,60,124,46,49,219,59,198,86,49,179,218,36,248,18,159,32,218,196,27,10,73,149,220,16,160,226,45,180,140,47,214,99,11,121,175,3,115,25,168,105,14,99,165,107,185,187,167,19,187,16,250,14,108,86,139,102,196,214,41,47,80,80,85,7,40,171,20,116,202,106,19,162,67,143,96,198,121,165,99,61,232,202,46,248,175,117,205,76,129,2,177,28,138,81,220,245,195,148,82,220,178,73,94,105,113,136,55,95,138,6,195,177,88,247,204,66,240,58,105,40,188,54,156,131,116,160,71,208,248,85,16,172,219,122,48,198,250,114,74,31,115,237,177,70,50,65,144,119,44,21,36,171,205,153,162,141,122,203,79,198,195,188,229,55,238,19,251,222,54,199,221,133,222,41,101,236,44,92,231,196,114,104,4,101,222,67,44,214,19,76,28,158,184,83,205,138,18,239,209,64,40,41,50,42,158,65,126,247,20,48,33,28,125,5,200,208,109,226,104,47,248,197,161,114,88,77,106,2,26,86,130,235,65,158,242,24,229,160,94,158,60,40,207,207,103,164,254,33,99,207,104,136,131,50,197,92,198,102,123,145,198,203,212,41,8,63,143,173,198,103,6,32,18,5,248,77,229,19,130,193,101,180,164,51,149,111,231,188,169,63,132,120,244,214,189,136,140,39,167,225,161,61,104,204,61,209,180,187,187,125,194,76,47,82,201,185,215,75,44,156,45,209,239,218,170,110,254,238,241,184,139,41,31,74,169,63,120,219,212,111,48,52,110,170,184,196,201,109,136,88,67,75,44,6,145,65,15,182,87,127,223,218,7,144,181,93,140,61,200,86,247,45,117,162,238,21,15,249,113,250,168,9,126,234,231,174,251,19,156,218,174,144,92,196,78,153,91,215,182,143,54,16,152,248,221,51,106,248,93,250,130,148,159,22,136,71,54,25,229,136,254,118,197,207,181,22,14,103,147,19,176,248,17,126,64,107,145,123,5,110,228,218,80,252,74,186,230,249,80,252,71,140,101,156,24,170,135,152,139,9,132,244,194,247,107,250,61,55,93,136,179,195,114,165,112,163,31,194,123,210,111,237,215,120,2,199,209,206,146,155,31,44,155,17,36,94,31,43,101,59,105,131,181,82,157,33,36,158,240,241,16,35,141,139,147,110,0,225,146,255,145,159,247,249,132,41,40,135,219,82,49,58,213,165,24,181,90,193,172,165,108,254,121,125,165,210,23,245,163,80,20,163,207,6,240,70,191,243,128,72,135,132,26,152,248,79,27,17,110,219,98,141,170,138,95,150,228,121,62,2,12,226,60,48,246,55,239,152,90,238,211,124,33,192,45,190,242,229,144,117,200,17,173,227,94,193,89,85,156,242,189,108,106,127,181,101,66,74,161,249,83,68,78,158,185,182,28,27,223,3,240,193,95,176,130,15,196,79,203,139,222,240,13,203,227,63,223,136,3,68,18,77,209,15,129,47,94,46,175,19,49,183,177,71,244,77,143,223,56,216,203,242,225,32,231,175,4,27,55,171,180,115,186,133,130,198,119,106,47,97,10,194,175,169,228,90,207,48,138,84,22,190,18,40,49,196,117,104,117,101,42,112,169,226,254,207,253,3,191,10,12,226,69,217,220,224,150,47,202,237,37,213,184,250,174,108,34,248,142,180,79,222,193,154,198,56,251,164,84,234,168,203,188,116,81,231,118,153,91,110,100,201,116,116,16,164,165,40,93,17,54,64,197,153,226,111,146,17,74,4,17,174,173,127,22,105,206,56,62,241,173,199,228,234,144,58,93,28,172,101,253,194,78,100,159,183,142,124,83,216,159,60,59,66,157,154,66,165,125,174,166,36,74,12,252,105,148,32,224,106,112,125,133,85,253,130,51,243,231,185,6,246,29,206,105,201,252,219,109,100,254,57,215,7,234,56,173,57,160,205,166,102,114,110,245,213,200,178,178,237,74,187,221,149,233,117,247,182,130,225,230,206,187,118,18,152,200,214,35,98,49,4,51,196,245,183,140,182,45,164,42,53,188,221,192,234,159,253,153,98,108,196,3,30,15,214,239,77,233,43,108,71,229,127,58,235,119,154,51,206,4,74,32,104,138,250,124,14,189,101,143,199,136,71,79,167,38,44,156,139,200,124,78,252,56,224,97,181,249,28,36,59,57,98,136,44,237,155,214,237,172,132,85,16,150,198,31,244,58,27,44,100,115,106,39,75,172,199,244,101,30,15,9,236,79,174,129,61,68,233,85,8,213,234,54,116,194,87,209,68,86,138,204,86,151,70,6,70,143,188,45,62,102,108,168,36,84,217,158,225,75,36,227,107,215,138,17,165,96,121,71,197,187,139,235,225,131,21,185,160,36,37,252,188,97,111,228,222,24,196,72,179,105,157,19,96,30,5,250,110,119,59,245,228,221,85,20,151,118,13,22,6,93,38,100,159,64,155,128,181,42,110,140,168,208,140,61,141,20,215,144,160,130,63,69,162,251,92,4,123,88,130,91,221,53,197,175,136,58,196,174,233,243,216,72,69,225,249,133,142,166,225,250,22,241,249,2,244,178,177,19,142,127,77,232,65,134,160,245,145,15,14,104,76,109,175,200,37,224,33,140,78,247,55,104,107,63,255,218,3,121,79,45,201,73,118,17,231,57,229,21,5,214,124,185,251,29,73,40,211,229,139,74,16,104,114,68,157,147,11,107,220,109,33,34,216,60,156,93,126,223,92,35,123,163,212,147,109,79,98,19,40,255,137,69,167,228,205,135,183,90,187,16,214,19,146,26,200,255,233,66,122,35,113,243,170,134,12,4,137,164,206,158,192,58,102,19,149,117,10,52,30,103,141,96,118,65,71,127,251,243,128,234,49,2,85,128,132,221,233,224,192,163,203,76,51,38,243,189,1,117,9,192,62,130,199,220,174,41,245,105,237,82,97,192,165,150,164,244,143,47,101,98,109,28,242,246,19,177,211,174,142,89,232,98,77,132,210,198,143,124,131,254,254,247,187,232,72,201,66,18,238,212,9,79,108,126,101,66,113,249,244,113,15,59,215,133,69,196,189,11,204,236,243,118,204,160,233,32,239,26,21,25,175,199,138,142,81,124,177,237,177,210,59,30,208,192,12,35,135,143,16,121,86,100,199,45,171,80,47,218,24,134,147,100,221,245,83,17,221,27,36,220,26,42,0,146,118,131,93,52,110,195,113,116,240,158,148,42,146,240,15,42,213,76,102,127,5,209,48,198,102,61,131,220,29,12,131,110,20,139,238,249,255,158,99,160,191,63,134,137,67,171,156,151,114,55,18,125,90,134,38,22,111,203,31,4,122,51,112,147,253,19,17,213,49,110,230,144,175,195,96,19,150,36,55,155,221,193,228,63,75,141,108,124,243,189,224,15,236,155,24,237,94,220,107,226,206,2,127,70,137,166,128,229,51,81,75,243,8,61,174,248,101,133,133,217,203,36,192,114,38,219,97,109,91,56,86,205,36,52,208,14,214,185,79,84,50,159,12,14,158,241,215,142,172,127,15,95,56,226,94,224,146,255,202,231,123,216,107,176,48,148,4,95,11,212,74,97,20,238,30,184,206,193,73,225,212,84,133,123,117,28,238,103,186,131,209,100,38,16,255,68,48,52,42,57,235,184,22,227,212,32,56,129,87,152,129,20,71,244,52,10,101,150,216,220,192,43,191,205,13,6,12,109,139,165,158,195,149,105,62,35,81,168,157,89,23,14,142,70,207,255,238,222,158,174,166,64,22,21,142,75,245,145,240,55,226,188,32,66,88,226,45,64,164,63,181,185,123,13,60,41,68,127,37,1,162,13,8,111,153,114,239,113,1,56,221,159,70,239,233,235,160,118,60,113,76,121,51,212,221,160,42,62,139,60,155,228,177,166,129,88,145,145,107,117,170,254,251,199,244,145,20,128,174,13,244,55,40,148,52,213,64,228,223,141,240,92,173,11,57,26,67,72,135,72,63,227,221,135,68,69,22,218,184,90,173,59,238,237,108,180,215,27,199,67,19,172,1,84,129,112,79,74,88,182,230,45,51,25,225,208,1,24,148,230,165,190,104,20,247,114,166,12,129,27,40,210,198,29,249,140,51,38,178,85,195,113,155,37,238,60,198,169,64,190,1,66,237,210,211,2,139,58,44,96,21,251,241,127,74,61,232,169,239,219,76,61,236,193,139,118,202,5,159,246,38,123,233,6,197,49,63,97,22,43,192,81,204,19,194,225,4,62,195,165,152,202,127,224,88,248,42,163,118,192,125,162,4,58,60,94,142,5,212,178,148,231,138,70,121,29,244,8,182,10,77,75,44,235,92,82,66,51,228,128,100,47,11,198,6,36,200,165,112,112,80,227,19,169,11,215,165,84,38,214,109,11,236,108,98,170,213,46,48,68,77,219,166,4,108,254,223,245,239,14,200,238,202,120,198,141,165,133,130,92,58,55,179,56,153,233,141,177,63,104,141,97,89,205,11,91,132,28,225,23,174,141,72,64,17,2,109,101,99,51,244,130,129,85,131,199,201,80,9,225,166,149,213,111,153,95,2,178,95,39,154,162,61,248,159,92,164,162,168,161,179,166,254,42,75,66,126,220,44,119,134,84,233,135,199,178,196,74,2,178,186,239,155,213,85,49,25,172,26,245,75,75,181,49,171,23,58,248,54,213,191,170,243,185,9,141,163,221,16,115,179,229,10,86,10,135,109,146,15,42,128,132,34,26,2,105,255,188,166,29,131,126,13,0,199,41,191,240,102,174,107,243,70,110,102,83,53,32,212,194,146,108,110,235,155,52,249,237,114,25,131,208,43,42,12,120,207,245,101,33,124,166,210,101,128,146,39,95,183,54,30,151,37,7,180,176,61,28,35,241,7,108,181,85,252,174,110,196,61,78,86,13,71,99,63,84,80,199,70,135,46,51,39,85,203,250,165,181,0,44,71,122,156,159,68,121,98,177,205,24,157,79,176,29,224,122,92,13,18,78,226,184,105,22,126,121,26,234,149,184,164,241,191,82,21,182,199,112,11,21,211,109,200,64,232,106,95,13,179,245,70,76,56,94,197,46,1,30,195,17,167,20,141,180,85,0,210,201,18,243,252,18,4,178,226,203,184,2,20,174,83,253,125,145,151,155,35,20,23,120,27,175,99,253,242,41,11,185,248,230,71,193,196,65,90,52,221,101,39,99,61,198,164,83,234,37,9,248,103,56,146,78,177,112,250,94,114,170,187,94,76,103,58,254,53,86,25,80,67,144,217,251,90,44,154,151,183,142,11,52,122,194,125,54,76,90,201,7,214,180,55,27,56,37,239,135,88,71,169,201,242,168,58,104,255,182,229,226,206,135,3,214,112,59,94,40,93,204,137,20,167,13,98,232,12,162,216,115,23,75,86,167,34,160,142,3,79,0,1,60,155,184,175,96,135,115,120,243,71,190,76,255,99,161,156,22,242,0,12,47,244,125,38,29,244,223,201,12,14,8,98,239,199,13,144,249,92,249,235,1,19,50,174,83,11,207,44,126,215,180,6,16,18,232,93,246,5,71,68,151,60,81,131,144,132,62,190,26,13,103,61,112,167,192,162,57,51,154,171,87,220,161,225,64,36,242,125,182,228,56,153,6,3,221,115,197,133,178,77,69,139,28,125,120,118,248,210,23,239,169,203,31,106,53,134,114,151,198,183,90,90,65,126,209,9,205,202,152,251,80,22,138,104,196,190,66,116,120,51,228,5,159,245,179,158,244,20,121,5,120,153,61,144,152,87,241,18,232,41,70,76,135,80,241,24,160,46,225,215,194,42,113,136,206,247,169,179,143,84,45,202,33,44,110,241,241,210,78,203,206,89,209,94,206,172,193,75,214,41,75,51,126,222,47,25,251,32,233,159,48,232,236,66,185,167,9,114,120,59,241,217,183,54,136,70,107,155,159,145,185,83,4,208,140,246,172,246,34,81,93,47,21,242,191,5,85,218,127,79,83,72,52,173,53,217,225,51,98,227,73,124,137,127,17,113,80,152,208,74,226,224,185,179,165,154,183,10,127,192,193,186,149,160,106,99,44,31,242,127,132,58,211,4,99,206,233,59,241,57,233,130,11,55,87,101,195,165,136,45,240,216,153,231,222,171,164,218,87,166,192,98,113,106,247,167,48,20,222,32,243,102,100,103,125,9,170,190,177,42,14,41,14,65,201,9,186,161,67,38,150,58,94,60,37,122,119,11,152,90,205,226,188,17,50,57,144,240,219,49,17,6,248,198,70,219,163,152,86,117,25,184,136,194,68,7,208,231,157,151,142,165,52,37,220,180,14,247,232,71,73,184,199,121,220,133,216,114,18,95,5,219,24,251,117,59,243,251,33,155,121,96,45,167,158,95,66,47,107,2,62,248,99,3,140,141,179,154,215,64,180,60,18,250,22,191,51,202,2,96,158,141,178,108,171,127,32,93,104,250,169,227,236,44,17,205,135,132,142,46,8,236,210,221,248,101,86,142,13,36,26,198,4,4,158,104,249,33,194,119,139,119,21,17,172,112,194,60,242,254,2,153,46,25,100,115,203,246,117,190,191,184,147,87,206,146,74,74,87,8,221,122,88,75,246,188,211,35,50,248,188,191,116,185,203,92,10,39,79,144,203,1,33,201,29,31,193,55,93,81,27,6,139,136,204,119,217,100,61,19,76,204,114,60,187,58,78,127,184,120,29,85,205,7,253,106,98,188,127,115,158,52,242,134,52,225,69,204,250,239,178,204,158,227,35,157,75,35,105,120,164,20,157,122,166,243,183,210,244,175,224,124,232,4,150,213,75,14,60,144,68,184,9,114,180,123,46,59,173,85,175,83,96,203,50,75,237,199,145,136,92,84,152,120,39,200,208,175,149,16,251,105,112,144,231,0,24,75,225,86,89,251,72,72,173,217,241,45,98,95,233,99,47,116,109,153,183,189,17,48,74,90,106,157,84,115,175,212,22,175,183,95,227,36,39,27,46,113,118,85,206,23,13,68,219,113,232,89,67,153,172,216,52,172,141,156,139,242,110,179,111,234,95,63,95,243,219,191,19,90,231,174,159,41,125,106,238,49,235,185,65,254,14,196,195,152,163,204,144,166,144,248,76,176,144,91,205,171,110,192,110,33,139,211,168,12,83,145,109,204,134,233,88,88,196,217,137,70,3,100,135,140,87,103,127,128,109,104,213,217,70,109,7,201,90,144,72,222,18,140,50,145,2,111,205,204,173,31,205,119,253,149,234,91,178,88,81,219,21,103,155,39,16,197,35,121,71,251,55,98,57,41,114,13,11,192,116,201,62,17,84,206,165,86,8,141,113,174,116,58,38,130,36,135,185,164,121,125,3,177,160,100,214,85,164,112,159,115,200,138,157,72,196,45,246,221,199,151,228,112,124,29,26,115,14,234,119,244,255,64,85,69,212,244,172,167,146,205,232,107,148,108,130,205,254,118,217,236,64,209,165,2,211,6,198,193,248,204,50,134,245,111,186,168,134,196,223,137,228,178,191,63,179,228,77,98,93,152,172,0,222,197,117,227,149,246,44,47,213,104,93,38,22,179,209,197,11,91,208,188,180,48,3,249,187,133,169,72,75,236,178,252,166,205,28,201,116,109,44,175,102,89,174,171,176,184,143,123,205,233,16,31,111,201,222,38,176,74,177,193,86,173,205,127,26,44,187,12,208,11,237,125,98,27,255,219,43,232,128,97,236,151,162,35,189,236,182,167,50,210,186,36,195,159,167,48,121,220,48,49,118,219,136,236,23,246,129,209,40,104,245,152,129,249,58,123,57,140,157,28,210,6,54,216,206,235,59,200,78,19,90,21,184,251,180,106,45,80,126,58,17,146,120,223,201,213,210,161,89,118,42,175,37,46,227,17,225,72,49,1,13,159,36,33,197,201,4,97,220,165,107,147,81,81,189,163,234,186,101,55,161,220,72,181,20,128,235,12,198,211,111,17,205,119,232,45,159,44,237,89,184,254,239,31,205,96,43,134,202,48,206,244,240,126,169,60,174,117,251,235,231,64,242,80,110,175,16,31,136,37,90,237,126,205,128,237,231,207,76,63,217,48,181,153,109,82,159,197,145,132,182,230,238,253,154,48,158,86,34,45,198,193,53,54,231,131,253,151,127,149,252,66,65,124,24,173,235,198,172,113,162,4,242,128,112,41,245,71,113,192,156,113,246,120,20,241,73,186,151,125,15,170,212,190,100,66,232,136,226,112,10,129,159,60,236,44,11,122,97,83,105,172,1,201,158,1,171,190,181,169,37,46,71,119,99,233,39,83,164,115,60,251,190,207,224,192,11,87,69,45,161,213,61,141,15,214,51,117,65,87,245,238,0,252,213,215,232,233,123,198,91,139,30,189,4,42,94,18,77,0,26,34,223,150,223,147,134,139,202,2,140,183,94,10,193,223,195,168,24,15,200,120,115,125,61,181,251,181,51,48,245,247,92,206,119,210,162,66,9,245,114,13,97,192,102,199,184,154,117,236,238,69,63,137,160,3,73,71,192,100,204,184,168,12,154,127,83,184,110,175,100,99,20,14,194,173,214,185,34,252,209,34,7,135,27,82,23,169,34,162,10,167,245,60,253,94,201,247,92,31,177,231,23,234,155,71,214,254,89,7,155,93,44,98,184,173,27,142,36,44,251,205,165,41,80,13,69,12,7,28,124,239,96,33,171,139,50,157,188,92,245,76,50,20,156,128,182,49,194,102,181,165,49,72,147,226,188,171,48,86,117,6,12,88,243,26,217,175,203,151,16,212,96,162,69,157,9,3,245,182,40,145,133,246,112,89,235,177,92,31,187,219,208,169,84,123,107,40,146,250,208,113,70,192,141,23,205,57,255,252,254,170,60,231,129,34,60,20,43,0,248,194,112,139,43,161,9,236,150,201,12,54,198,161,215,127,208,8,160,138,53,237,98,191,255,149,47,140,222,121,28,232,138,22,250,2,102,94,142,51,40,117,125,70,158,102,84,27,224,91,35,224,163,78,72,210,230,77,21,122,18,192,212,133,68,22,98,12,209,16,49,67,70,89,5,64,111,117,34,49,160,146,85,123,214,225,98,200,43,210,245,219,233,222,238,45,158,94,186,238,80,61,199,140,34,187,249,15,91,88,33,39,121,63,76,189,207,3,140,139,81,140,192,187,188,139,98,26,254,192,155,237,53,208,53,135,177,22,167,247,50,15,125,83,18,103,192,69,97,136,21,48,21,120,27,148,178,66,230,250,28,40,200,243,167,64,167,30,105,219,4,106,170,101,4,103,187,48,92,69,99,177,69,128,66,177,30,6,66,29,163,158,64,51,22,143,130,63,214,127,251,213,135,30,199,114,176,30,79,50,85,206,147,74,232,18,196,142,204,80,180,227,19,54,16,29,242,25,101,155,246,103,241,132,202,23,95,211,16,167,200,55,187,227,255,205,63,149,79,85,95,239,203,100,209,26,73,125,55,47,125,135,253,144,241,157,188,37,248,39,62,109,42,248,98,242,115,101,175,234,245,7,209,23,32,43,159,181,208,148,242,185,137,132,105,20,249,54,228,58,75,119,17,203,13,224,173,138,154,87,29,78,105,253,140,228,198,68,147,25,240,216,192,172,111,236,53,129,15,178,221,33,77,141,187,102,2,131,173,20,246,131,37,61,16,53,156,241,100,240,126,190,246,69,44,145,251,64,92,117,103,223,118,135,18,96,84,93,51,217,80,62,95,66,90,97,191,36,131,113,212,50,157,156,28,177,197,186,96,144,103,199,138,95,242,173,203,155,237,223,132,171,46,150,220,86,133,25,163,65,57,197,1,57,233,98,38,187,90,1,82,13,186,151,255,66,244,162,53,92,159,88,44,104,200,132,191,189,240,234,234,216,54,223,56,158,98,36,2,143,43,76,118,65,213,159,113,68,73,158,243,11,214,125,43,54,246,234,250,16,77,8,202,87,47,57,123,38,224,209,231,14,36,48,252,23,5,39,106,16,33,172,85,234,252,200,141,200,34,108,94,87,10,84,9,15,154,33,70,137,228,58,123,113,82,34,209,54,89,208,145,137,22,240,198,105,175,77,152,175,237,209,221,208,29,201,227,91,1,1,169,236,162,31,132,207,111,233,21,160,183,166,51,187,138,98,204,53,25,82,222,212,234,117,68,194,68,221,200,25,129,85,155,62,44,87,135,187,67,112,219,144,100,98,185,23,109,57,216,162,210,40,78,153,240,13,188,99,245,159,73,183,193,192,240,105,98,253,17,221,184,222,151,179,60,90,232,22,157,248,166,204,13,4,128,222,212,105,231,245,165,106,165,47,151,72,31,244,88,89,119,223,95,242,241,222,54,26,193,29,177,224,142,151,16,221,229,172,119,71,183,229,203,231,41,30,52,150,130,69,62,171,45,32,151,35,194,65,87,70,139,38,253,198,80,202,170,165,104,95,48,38,77,67,253,235,214,74,250,129,238,127,12,108,255,59,149,51,142,48,69,41,205,95,29,65,214,223,128,18,62,158,127,210,48,104,158,30,21,252,161,112,126,146,184,30,195,144,234,111,6,4,48,98,146,14,102,216] ;
    
    		
    var MAX_VALUE = 2147483647;
    
    //function scrypt(byte[] passwd, byte[] salt, int N, int r, int p, int dkLen)
    /*
     * N = Cpu cost
     * r = Memory cost
     * p = parallelization cost
     *
     */
    function scrypt(passwd, salt, N, r, p, dkLen) {
        if (N == 0 || (N & (N - 1)) != 0) throw Error("N must be > 0 and a power of 2");
    
        if (N > MAX_VALUE / 128 / r) throw Error("Parameter N is too large");
        if (r > MAX_VALUE / 128 / p) throw Error("Parameter r is too large");
    
        var DK = []; //new Array(dkLen);
    
        var B  = []; //new Array(128 * r * p);
        var XY = []; //new Array(256 * r);
        var V  = []; //new Array(128 * r * N);
        var i;
    
        //PBKDF(passwd, new Buffer(salt, encoding='utf8'), 1, B, p * 128 * r);
        //console.log(new Buffer(B, 'base64').toString('base64'));
    
        B = BSeed;
    
        for(i = 0; i < p; i++) {
            smix(B, i * 128 * r, r, N, V, XY);
        }
    
        //PBKDF(passwd, B, 1, DK, dkLen);
        return B.splice(0,50);// new Buffer(DK).toString('base64');
    }
    
    function smix(B, Bi, r, N, V, XY) {
        var Xi = 0;
        var Yi = 128 * r;
        var i;
    
        arraycopy(B, Bi, XY, Xi, Yi);
    
        for (i = 0; i < N; i++) {
                arraycopy(XY, Xi, V, i * Yi, Yi);
            blockmix_salsa8(XY, Xi, Yi, r);
        }
    
        for (i = 0; i < N; i++) {
            var j = integerify(XY, Xi, r) & (N - 1);
            blockxor(V, j * Yi, XY, Xi, Yi);
            blockmix_salsa8(XY, Xi, Yi, r);
        }
    
        arraycopy(XY, Xi, B, Bi, Yi);
    }
    
    function blockmix_salsa8(BY, Bi, Yi, r) {
        var X = [];
        var i;
    
        arraycopy32(BY, Bi + (2 * r - 1) * 64, X, 0, 64);
    
        for (i = 0; i < 2 * r; i++) {
            blockxor(BY, i * 64, X, 0, 64);
            salsa20_8(X);
            arraycopy32(X, 0, BY, Yi + (i * 64), 64);
        }
    
        for (i = 0; i < r; i++) {
                arraycopy32(BY, Yi + (i * 2) * 64, BY, Bi + (i * 64), 64);
        }
    
        for (i = 0; i < r; i++) {
                arraycopy32(BY, Yi + (i * 2 + 1) * 64, BY, Bi + (i + r) * 64, 64);
        }
    }
    
    function R(a, b) {
        return (a << b) | (a >>> (32 - b));
    }
    
    function salsa20_8(B) {
        var B32 = new Array(32);
        var x   = new Array(32);
        var i;
    
        for (i = 0; i < 16; i++) {
            B32[i]  = (B[i * 4 + 0] & 0xff) << 0;
            B32[i] |= (B[i * 4 + 1] & 0xff) << 8;
            B32[i] |= (B[i * 4 + 2] & 0xff) << 16;
            B32[i] |= (B[i * 4 + 3] & 0xff) << 24;
        }
    
        arraycopy(B32, 0, x, 0, 16);
    
        for (i = 8; i > 0; i -= 2) {
            x[ 4] ^= R(x[ 0]+x[12], 7);  x[ 8] ^= R(x[ 4]+x[ 0], 9);
            x[12] ^= R(x[ 8]+x[ 4],13);  x[ 0] ^= R(x[12]+x[ 8],18);
            x[ 9] ^= R(x[ 5]+x[ 1], 7);  x[13] ^= R(x[ 9]+x[ 5], 9);
            x[ 1] ^= R(x[13]+x[ 9],13);  x[ 5] ^= R(x[ 1]+x[13],18);
            x[14] ^= R(x[10]+x[ 6], 7);  x[ 2] ^= R(x[14]+x[10], 9);
            x[ 6] ^= R(x[ 2]+x[14],13);  x[10] ^= R(x[ 6]+x[ 2],18);
            x[ 3] ^= R(x[15]+x[11], 7);  x[ 7] ^= R(x[ 3]+x[15], 9);
            x[11] ^= R(x[ 7]+x[ 3],13);  x[15] ^= R(x[11]+x[ 7],18);
            x[ 1] ^= R(x[ 0]+x[ 3], 7);  x[ 2] ^= R(x[ 1]+x[ 0], 9);
            x[ 3] ^= R(x[ 2]+x[ 1],13);  x[ 0] ^= R(x[ 3]+x[ 2],18);
            x[ 6] ^= R(x[ 5]+x[ 4], 7);  x[ 7] ^= R(x[ 6]+x[ 5], 9);
            x[ 4] ^= R(x[ 7]+x[ 6],13);  x[ 5] ^= R(x[ 4]+x[ 7],18);
            x[11] ^= R(x[10]+x[ 9], 7);  x[ 8] ^= R(x[11]+x[10], 9);
            x[ 9] ^= R(x[ 8]+x[11],13);  x[10] ^= R(x[ 9]+x[ 8],18);
            x[12] ^= R(x[15]+x[14], 7);  x[13] ^= R(x[12]+x[15], 9);
            x[14] ^= R(x[13]+x[12],13);  x[15] ^= R(x[14]+x[13],18);
        }
    
        for (i = 0; i < 16; ++i) B32[i] = x[i] + B32[i];
    
        for (i = 0; i < 16; i++) {
                var bi = i * 4;
            B[bi + 0] = (B32[i] >> 0  & 0xff);
            B[bi + 1] = (B32[i] >> 8  & 0xff);
            B[bi + 2] = (B32[i] >> 16 & 0xff);
            B[bi + 3] = (B32[i] >> 24 & 0xff);
        }
    }
    
    function blockxor(S, Si, D, Di, len) {
    //    for (var i = 0; i < len; i++) {
    //        D[Di + i] ^= S[Si + i];
    //    }
            var i = len>>6;
            while (i--) {
    //                D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    //32
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
    
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    D[Di++] ^= S[Si++]; D[Di++] ^= S[Si++];
                    // 64
    
            }
    }
    
    function integerify(B, bi, r) {
        var n;
    
        bi += (2 * r - 1) * 64;
    
        n  = (B[bi + 0] & 0xff) << 0;
        n |= (B[bi + 1] & 0xff) << 8;
        n |= (B[bi + 2] & 0xff) << 16;
        n |= (B[bi + 3] & 0xff) << 24;
    
        return n;
    }
    
    function arraycopy(src, srcPos, dest, destPos, length) {
             while (length-- ){
                     dest[destPos++] = src[srcPos++];
             }
    }
    
    function arraycopy16(src, srcPos, dest, destPos, length) {
            var i = length>>4;
            while(i--) {
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
    
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
            }
    }
    
    function arraycopy32(src, srcPos, dest, destPos, length) {
            var i = length>>5;
            while(i--) {
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
    
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
    
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
    
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    dest[destPos++] = src[srcPos++]; dest[destPos++] = src[srcPos++];
                    // 32
            }
    }
    	</script>
    </head>
    <body>
    	<p>Expected: <br /><span>80,84,90,200,243,142,148,51,18,52,58,127,144,147,42,40,172,31,5,249,4,211,149,232,100,179,13,200,182,100,49,54,146,202,93,103,54,30,244,238,119,50,209,252,46,75,99,180,13,105</span></p>
    	<p>Actual: <br /><span id="testspan">Calculating.....</span></p>
    <script type="text/javascript">
    	var text = 'घोडा स्टेपल';
    	var span = document.getElementById('testspan');
    
    	setTimeout(function() {
    		console.log('Calculations started');
    		span.innerHTML = scrypt(text, [92,178,185,162], 16384, 8, 8, 64);
    		console.log('Calculations finished');
    	}, 300);
    </script>
    </body>
    </html>
    
    

    external by ArmanSo  80  0  1  0

    AES encryption/decryption in crypto-js way, use KDF for generating IV and Key, use CBC with PKCS7Padding for Cipher

    AES encryption/decryption in crypto-js way, use KDF for generating IV and Key, use CBC with PKCS7Padding for Cipher: AES.java
    import com.sun.jersey.core.util.Base64;
    import java.io.UnsupportedEncodingException;
    import java.security.InvalidAlgorithmParameterException;
    import java.security.InvalidKeyException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.security.SecureRandom;
    import java.util.Arrays;
    import java.util.Random;
    import javax.crypto.BadPaddingException;
    import javax.crypto.Cipher;
    import javax.crypto.IllegalBlockSizeException;
    import javax.crypto.NoSuchPaddingException;
    import javax.crypto.SecretKey;
    import javax.crypto.spec.IvParameterSpec;
    import javax.crypto.spec.SecretKeySpec;
    
    public class AES {
    
        /**
         *
         * Conforming with CryptoJS AES method
         * **** YOU NEED TO ADD "JCE policy" to have ability to DEC/ENC with 256 key with AES Cipher ****
         *
         */
    
        // Prevent facing error when using "PKCS7Padding" in Cipher
        // add Bouncycastle provider [link=http://www.bouncycastle.org/latest_releases.html]
        static {
            java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
        }
    
        static int KEY_SIZE = 256;
        static int IV_SIZE = 128;
        static String HASH_CIPHER = "AES/CBC/PKCS7Padding";
        static String AES = "AES";
        static String CHARSET_TYPE = "UTF-8";
    
    
        // Seriously! crypto-js, what's wrong with you?
        static String APPEND = "Salted__";
    
        /**
         * Encrypt
         * @param password passphrase
         * @param plainText plain string
         */
        public static String encrypt(String password,String plainText) throws UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
            byte[] saltBytes = generateSalt(8);
            byte[] key = new byte[KEY_SIZE/8];
            byte[] iv = new byte[IV_SIZE/8];
    
            EvpKDF(password.getBytes("UTF-8"), KEY_SIZE, IV_SIZE, saltBytes, key, iv);
    
            SecretKey keyS = new SecretKeySpec(key, AES);
    
            Cipher cipher = Cipher.getInstance(HASH_CIPHER);
            IvParameterSpec ivSpec = new IvParameterSpec(iv);
            cipher.init(Cipher.ENCRYPT_MODE, keyS, ivSpec);
            byte[] cipherText = cipher.doFinal(plainText.getBytes("UTF-8"));
    
            // Thanks kientux for this: https://gist.github.com/kientux/bb48259c6f2133e628ad
            // Create CryptoJS-like encrypted !
    
            byte[] sBytes = APPEND.getBytes("UTF-8");
            byte[] b = new byte[sBytes.length + saltBytes.length + cipherText.length];
            System.arraycopy(sBytes, 0, b, 0, sBytes.length);
            System.arraycopy(saltBytes, 0, b, sBytes.length, saltBytes.length);
            System.arraycopy(cipherText, 0, b, sBytes.length + saltBytes.length, cipherText.length);
    
            byte[] bEncode = Base64.encode(b);
    
            return new String(bEncode);
        }
    
        /**
         * Decrypt
         * Thanks Artjom B. for this: http://stackoverflow.com/a/29152379/4405051
         * @param password passphrase
         * @param cipherText encrypted string
         */
        public static String decrypt(String password,String cipherText) throws UnsupportedEncodingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
            byte[] ctBytes = Base64.decode(cipherText.getBytes(CHARSET_TYPE));
            byte[] saltBytes = Arrays.copyOfRange(ctBytes, 8, 16);
            byte[] ciphertextBytes = Arrays.copyOfRange(ctBytes, 16, ctBytes.length);
            byte[] key = new byte[KEY_SIZE/8];
            byte[] iv = new byte[IV_SIZE/8];
    
            EvpKDF(password.getBytes(CHARSET_TYPE), KEY_SIZE, IV_SIZE, saltBytes, key, iv);
    
            Cipher cipher = Cipher.getInstance(HASH_CIPHER);
            SecretKey keyS = new SecretKeySpec(key, AES);
    
            cipher.init(Cipher.DECRYPT_MODE, keyS, new IvParameterSpec(iv));
            byte[] plainText = cipher.doFinal(ciphertextBytes);
            return new String(plainText);
        }
    
        private static byte[] EvpKDF(byte[] password, int keySize, int ivSize, byte[] salt, byte[] resultKey, byte[] resultIv) throws NoSuchAlgorithmException {
            return EvpKDF(password, keySize, ivSize, salt, 1, "MD5", resultKey, resultIv);
        }
    
        private static byte[] EvpKDF(byte[] password, int keySize, int ivSize, byte[] salt, int iterations, String hashAlgorithm, byte[] resultKey, byte[] resultIv) throws NoSuchAlgorithmException {
            keySize = keySize / 32;
            ivSize = ivSize / 32;
            int targetKeySize = keySize + ivSize;
            byte[] derivedBytes = new byte[targetKeySize * 4];
            int numberOfDerivedWords = 0;
            byte[] block = null;
            MessageDigest hasher = MessageDigest.getInstance(hashAlgorithm);
            while (numberOfDerivedWords < targetKeySize) {
                if (block != null) {
                    hasher.update(block);
                }
                hasher.update(password);
                block = hasher.digest(salt);
                hasher.reset();
    
                // Iterations
                for (int i = 1; i < iterations; i++) {
                    block = hasher.digest(block);
                    hasher.reset();
                }
    
                System.arraycopy(block, 0, derivedBytes, numberOfDerivedWords * 4,
                        Math.min(block.length, (targetKeySize - numberOfDerivedWords) * 4));
    
                numberOfDerivedWords += block.length/4;
            }
    
            System.arraycopy(derivedBytes, 0, resultKey, 0, keySize * 4);
            System.arraycopy(derivedBytes, keySize * 4, resultIv, 0, ivSize * 4);
    
            return derivedBytes; // key + iv
        }
    
        private static byte[] generateSalt(int length) {
            Random r = new SecureRandom();
            byte[] salt = new byte[length];
            r.nextBytes(salt);
            return salt;
        }
    }
    
    
    

    external by PatPositron  22  0  1  0

    Requires http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js

    Requires http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js: MbamGen.js
    function getKey(identifier) {
    	var chars = '0123456789ABCDEFGHJKLMNPQRTUVWXY',
    		hash = CryptoJS.MD5(identifier).toString().toUpperCase(),
    		parts = [];
    	
    	for (var i = 0; i < 32; i += 2) {
    		var nextDigit = parseInt(hash.substr(i, 2), 16) & 31,
    			withDash = (((i % 8) == 0) && (i > 0));
    	
    		parts.push(withDash ? '-' : '');
    		parts.push(chars.substr(nextDigit, 1));
    	}
    	
    	return {id: identifier, key:parts.join('')};
    }
    
    

    external by blanchma  1585  1  4  0

    http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/tripledes.js

    http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/tripledes.js: crypto-js
    /*
    CryptoJS v3.1.2
    code.google.com/p/crypto-js
    (c) 2009-2013 by Jeff Mott. All rights reserved.
    code.google.com/p/crypto-js/wiki/License
    */
    var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
    q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var t=0;t<a;t++)c[f+t>>>2]|=(m[t>>>2]>>>24-8*(t%4)&255)<<24-8*((f+t)%4);else if(65535<m.length)for(t=0;t<a;t+=4)c[f+t>>>2]=m[t>>>2];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
    32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],m=0;m<a;m+=4)c.push(4294967296*u.random()|0);return new q.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f<a;f++){var t=c[f>>>2]>>>24-8*(f%4)&255;m.push((t>>>4).toString(16));m.push((t&15).toString(16))}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f<c;f+=2)m[f>>>3]|=parseInt(a.substr(f,
    2),16)<<24-4*(f%8);return new q.init(m,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f<a;f++)m.push(String.fromCharCode(c[f>>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f<c;f++)m[f>>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},
    r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(4*t),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*t;f=u.min(4*a,f);if(a){for(var e=0;e<a;e+=t)this._doProcessBlock(m,e);e=m.splice(0,a);c.sigBytes-=f}return new q.init(e,f)},clone:function(){var a=s.clone.call(this);
    a._data=this._data.clone();return a},_minBufferSize:0});n.Hasher=r.extend({cfg:s.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){r.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(c,m){return(new a.init(m)).finalize(c)}},_createHmacHelper:function(a){return function(c,m){return(new e.HMAC.init(a,
    m)).finalize(c)}}});var e=d.algo={};return d}(Math);
    (function(){var u=CryptoJS,l=u.lib.WordArray;u.enc.Base64={stringify:function(d){var n=d.words,l=d.sigBytes,s=this._map;d.clamp();d=[];for(var q=0;q<l;q+=3)for(var w=(n[q>>>2]>>>24-8*(q%4)&255)<<16|(n[q+1>>>2]>>>24-8*((q+1)%4)&255)<<8|n[q+2>>>2]>>>24-8*((q+2)%4)&255,v=0;4>v&&q+0.75*v<l;v++)d.push(s.charAt(w>>>6*(3-v)&63));if(n=s.charAt(64))for(;d.length%4;)d.push(n);return d.join("")},parse:function(d){var n=d.length,p=this._map,s=p.charAt(64);s&&(s=d.indexOf(s),-1!=s&&(n=s));for(var s=[],q=0,w=0;w<
    n;w++)if(w%4){var v=p.indexOf(d.charAt(w-1))<<2*(w%4),b=p.indexOf(d.charAt(w))>>>6-2*(w%4);s[q>>>2]|=(v|b)<<24-8*(q%4);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
    (function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<<f|b>>>32-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<<f|b>>>32-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<<f|b>>>32-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<<f|b>>>32-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},
    _doProcessBlock:function(r,e){for(var a=0;16>a;a++){var c=e+a,m=r[c];r[c]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var a=this._hash.words,c=r[e+0],m=r[e+1],f=r[e+2],t=r[e+3],y=r[e+4],q=r[e+5],s=r[e+6],w=r[e+7],v=r[e+8],u=r[e+9],x=r[e+10],z=r[e+11],A=r[e+12],B=r[e+13],C=r[e+14],D=r[e+15],g=a[0],h=a[1],j=a[2],k=a[3],g=l(g,h,j,k,c,7,b[0]),k=l(k,g,h,j,m,12,b[1]),j=l(j,k,g,h,f,17,b[2]),h=l(h,j,k,g,t,22,b[3]),g=l(g,h,j,k,y,7,b[4]),k=l(k,g,h,j,q,12,b[5]),j=l(j,k,g,h,s,17,b[6]),h=l(h,j,k,g,w,22,b[7]),
    g=l(g,h,j,k,v,7,b[8]),k=l(k,g,h,j,u,12,b[9]),j=l(j,k,g,h,x,17,b[10]),h=l(h,j,k,g,z,22,b[11]),g=l(g,h,j,k,A,7,b[12]),k=l(k,g,h,j,B,12,b[13]),j=l(j,k,g,h,C,17,b[14]),h=l(h,j,k,g,D,22,b[15]),g=d(g,h,j,k,m,5,b[16]),k=d(k,g,h,j,s,9,b[17]),j=d(j,k,g,h,z,14,b[18]),h=d(h,j,k,g,c,20,b[19]),g=d(g,h,j,k,q,5,b[20]),k=d(k,g,h,j,x,9,b[21]),j=d(j,k,g,h,D,14,b[22]),h=d(h,j,k,g,y,20,b[23]),g=d(g,h,j,k,u,5,b[24]),k=d(k,g,h,j,C,9,b[25]),j=d(j,k,g,h,t,14,b[26]),h=d(h,j,k,g,v,20,b[27]),g=d(g,h,j,k,B,5,b[28]),k=d(k,g,
    h,j,f,9,b[29]),j=d(j,k,g,h,w,14,b[30]),h=d(h,j,k,g,A,20,b[31]),g=n(g,h,j,k,q,4,b[32]),k=n(k,g,h,j,v,11,b[33]),j=n(j,k,g,h,z,16,b[34]),h=n(h,j,k,g,C,23,b[35]),g=n(g,h,j,k,m,4,b[36]),k=n(k,g,h,j,y,11,b[37]),j=n(j,k,g,h,w,16,b[38]),h=n(h,j,k,g,x,23,b[39]),g=n(g,h,j,k,B,4,b[40]),k=n(k,g,h,j,c,11,b[41]),j=n(j,k,g,h,t,16,b[42]),h=n(h,j,k,g,s,23,b[43]),g=n(g,h,j,k,u,4,b[44]),k=n(k,g,h,j,A,11,b[45]),j=n(j,k,g,h,D,16,b[46]),h=n(h,j,k,g,f,23,b[47]),g=p(g,h,j,k,c,6,b[48]),k=p(k,g,h,j,w,10,b[49]),j=p(j,k,g,h,
    C,15,b[50]),h=p(h,j,k,g,q,21,b[51]),g=p(g,h,j,k,A,6,b[52]),k=p(k,g,h,j,t,10,b[53]),j=p(j,k,g,h,x,15,b[54]),h=p(h,j,k,g,m,21,b[55]),g=p(g,h,j,k,v,6,b[56]),k=p(k,g,h,j,D,10,b[57]),j=p(j,k,g,h,s,15,b[58]),h=p(h,j,k,g,B,21,b[59]),g=p(g,h,j,k,y,6,b[60]),k=p(k,g,h,j,z,10,b[61]),j=p(j,k,g,h,f,15,b[62]),h=p(h,j,k,g,u,21,b[63]);a[0]=a[0]+g|0;a[1]=a[1]+h|0;a[2]=a[2]+j|0;a[3]=a[3]+k|0},_doFinalize:function(){var b=this._data,e=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;e[c>>>5]|=128<<24-c%32;var m=u.floor(a/
    4294967296);e[(c+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;e[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(e.length+1);this._process();b=this._hash;e=b.words;for(a=0;4>a;a++)c=e[a],e[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math);
    (function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length<r;){e&&v.update(e);var e=v.update(d).finalize(l);v.reset();for(var a=1;a<p;a++)e=v.finalize(e),v.reset();b.concat(e)}b.sigBytes=4*r;return b}});u.EvpKDF=function(d,l,n){return p.create(n).compute(d,
    l)}})();
    CryptoJS.lib.Cipher||function(u){var l=CryptoJS,d=l.lib,n=d.Base,p=d.WordArray,s=d.BufferedBlockAlgorithm,q=l.enc.Base64,w=l.algo.EvpKDF,v=d.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(m,a){return this.create(this._ENC_XFORM_MODE,m,a)},createDecryptor:function(m,a){return this.create(this._DEC_XFORM_MODE,m,a)},init:function(m,a,b){this.cfg=this.cfg.extend(b);this._xformMode=m;this._key=a;this.reset()},reset:function(){s.reset.call(this);this._doReset()},process:function(a){this._append(a);return this._process()},
    finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(m){return{encrypt:function(f,b,e){return("string"==typeof b?c:a).encrypt(m,f,b,e)},decrypt:function(f,b,e){return("string"==typeof b?c:a).decrypt(m,f,b,e)}}}});d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var b=l.mode={},x=function(a,f,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var e=0;e<b;e++)a[f+e]^=
    c[e]},r=(d.BlockCipherMode=n.extend({createEncryptor:function(a,f){return this.Encryptor.create(a,f)},createDecryptor:function(a,f){return this.Decryptor.create(a,f)},init:function(a,f){this._cipher=a;this._iv=f}})).extend();r.Encryptor=r.extend({processBlock:function(a,f){var b=this._cipher,c=b.blockSize;x.call(this,a,f,c);b.encryptBlock(a,f);this._prevBlock=a.slice(f,f+c)}});r.Decryptor=r.extend({processBlock:function(a,b){var c=this._cipher,e=c.blockSize,d=a.slice(b,b+e);c.decryptBlock(a,b);x.call(this,
    a,b,e);this._prevBlock=d}});b=b.CBC=r;r=(l.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,c=c-a.sigBytes%c,e=c<<24|c<<16|c<<8|c,d=[],l=0;l<c;l+=4)d.push(e);c=p.create(d,c);a.concat(c)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=1;this._mode=b.call(a,
    this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([1398893684,
    1701076831]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var b=p.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},
    decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random(8));a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),4*b);a.sigBytes=4*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e,
    c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}();
    (function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<<b}function l(b,a){var c=(this._rBlock>>>b^this._lBlock)&a;this._lBlock^=c;this._rBlock^=c<<b}var d=CryptoJS,n=d.lib,p=n.WordArray,n=n.BlockCipher,s=d.algo,q=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],w=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,
    55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],b=[{"0":8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,
    2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,
    1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{"0":1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,
    75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,
    276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{"0":260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,
    14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,
    17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{"0":2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,
    98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,
    1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{"0":128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,
    10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,
    83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{"0":268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,
    2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{"0":1048576,
    16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,
    496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{"0":134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,
    2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,
    2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],x=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],r=s.DES=n.extend({_doReset:function(){for(var b=this._key.words,a=[],c=0;56>c;c++){var d=q[c]-1;a[c]=b[d>>>5]>>>31-d%32&1}b=this._subKeys=[];for(d=0;16>d;d++){for(var f=b[d]=[],l=v[d],c=0;24>c;c++)f[c/6|0]|=a[(w[c]-1+l)%28]<<31-c%6,f[4+(c/6|0)]|=a[28+(w[c+24]-1+l)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>=
    4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}a=this._invSubKeys=[];for(c=0;16>c;c++)a[c]=b[15-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+1];u.call(this,4,252645135);u.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);u.call(this,1,1431655765);for(var d=0;16>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=0,r=0;8>r;r++)q|=b[r][((p^
    f[r])&x[r])>>>0];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);u.call(this,16,65535);u.call(this,4,252645135);e[a]=this._lBlock;e[a+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(0,2)));this._des2=r.createEncryptor(p.create(b.slice(2,4)));this._des3=
    r.createEncryptor(p.create(b.slice(4,6)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=n._createHelper(s)})();
    
    

    external by Elad Ossadon  10  0  1  0

    cryptocurrency.js

    cryptocurrency.js: cryptocurrency.js
    let valueInUSD = 1
    
    setInterval(() => {
      valueInUSD = Math.max(valueInUSD + (Math.random() >= 0.5 ? 1 : -1) * Math.random() / (5 * Math.random()), 0.1)
      console.log('valueInUSD', valueInUSD)
    }, 10)
    
    
    

    external by artjomb  599  82  3  0

    Convert a byte array to a word array and back in CryptoJS-compatible fashion

    Convert a byte array to a word array and back in CryptoJS-compatible fashion: CryptoJS_byteArrayWordArrayConversions.js
    function byteArrayToWordArray(ba) {
    	var wa = [],
    	i;
    	for (i = 0; i < ba.length; i++) {
    		wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i);
    	}
    
    	return WordArray.create(wa, ba.length);
    }
    
    function wordToByteArray(word, length) {
    	var ba = [],
    	i,
    	xFF = 0xFF;
    	if (length > 0)
    		ba.push(word >>> 24);
    	if (length > 1)
    		ba.push((word >>> 16) & xFF);
    	if (length > 2)
    		ba.push((word >>> 8) & xFF);
    	if (length > 3)
    		ba.push(word & xFF);
    
    	return ba;
    }
    
    function wordArrayToByteArray(wordArray, length) {
    	if (wordArray.hasOwnProperty("sigBytes") && wordArray.hasOwnProperty("words")) {
    		length = wordArray.sigBytes;
    		wordArray = wordArray.words;
    	}
    
    	var result = [],
    	bytes
    	i = 0;
    	while (length > 0) {
    		bytes = wordToByteArray(wordArray[i], Math.min(4, length));
    		length -= bytes.length;
    		result = result.concat(bytes);
    		i++;
    	}
    	return result;
    }
    
    

    external by CodyKochmann  80  0  1  0

    Simple wrapper around CryptoJS to make best practices in encryption simple and easier to remember. Example usage: Crypto.encrypt(secret_data,password) Crypto.decrypt(encrypted,password) Crypto.hash(password)

    Simple wrapper around CryptoJS to make best practices in encryption simple and easier to remember. Example usage: Crypto.encrypt(secret_data,password) Crypto.decrypt(encrypted,password) Crypto.hash(password): crypto.js
    (function(){
    /* CryptoJS v3.1.2 below */
    var CryptoJS=CryptoJS||function(g,p){var e={},m=e.lib={},r=function(){},v=m.Base={extend:function(a){r.prototype=this;var d=new r;a&&d.mixIn(a);d.hasOwnProperty("init")||(d.init=function(){d.$super.init.apply(this,arguments)});d.init.prototype=d;d.$super=this;return d},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var d in a)a.hasOwnProperty(d)&&(this[d]=a[d]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
    u=m.WordArray=v.extend({init:function(a,d){a=this.words=a||[];this.sigBytes=d!=p?d:4*a.length},toString:function(a){return(a||x).stringify(this)},concat:function(a){var d=this.words,l=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var q=0;q<a;q++)d[b+q>>>2]|=(l[q>>>2]>>>24-q%4*8&255)<<24-(b+q)%4*8;else if(65535<l.length)for(q=0;q<a;q+=4)d[b+q>>>2]=l[q>>>2];else d.push.apply(d,l);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<<32-
    d%4*8;a.length=g.ceil(d/4)},clone:function(){var a=v.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],l=0;l<a;l+=4)d.push(4294967296*g.random()|0);return new u.init(d,a)}}),y=e.enc={},x=y.Hex={stringify:function(a){var d=a.words;a=a.sigBytes;for(var l=[],b=0;b<a;b++){var q=d[b>>>2]>>>24-b%4*8&255;l.push((q>>>4).toString(16));l.push((q&15).toString(16))}return l.join("")},parse:function(a){for(var d=a.length,l=[],b=0;b<d;b+=2)l[b>>>3]|=parseInt(a.substr(b,2),16)<<
    24-b%8*4;return new u.init(l,d/2)}},c=y.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var l=[],b=0;b<a;b++)l.push(String.fromCharCode(d[b>>>2]>>>24-b%4*8&255));return l.join("")},parse:function(a){for(var d=a.length,l=[],b=0;b<d;b++)l[b>>>2]|=(a.charCodeAt(b)&255)<<24-b%4*8;return new u.init(l,d)}},w=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},
    t=m.BufferedBlockAlgorithm=v.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=w.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,l=d.words,b=d.sigBytes,q=this.blockSize,c=b/(4*q),c=a?g.ceil(c):g.max((c|0)-this._minBufferSize,0);a=c*q;b=g.min(4*a,b);if(a){for(var t=0;t<a;t+=q)this._doProcessBlock(l,t);t=l.splice(0,a);d.sigBytes-=b}return new u.init(t,b)},clone:function(){var a=v.clone.call(this);
    a._data=this._data.clone();return a},_minBufferSize:0});m.Hasher=t.extend({cfg:v.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){t.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(d,l){return(new a.init(l)).finalize(d)}},_createHmacHelper:function(a){return function(d,l){return(new z.HMAC.init(a,
    l)).finalize(d)}}});var z=e.algo={};return e}(Math);
    (function(){var g=CryptoJS,p=g.lib.WordArray;g.enc.Base64={stringify:function(e){var m=e.words,p=e.sigBytes,v=this._map;e.clamp();e=[];for(var u=0;u<p;u+=3)for(var g=(m[u>>>2]>>>24-u%4*8&255)<<16|(m[u+1>>>2]>>>24-(u+1)%4*8&255)<<8|m[u+2>>>2]>>>24-(u+2)%4*8&255,x=0;4>x&&u+.75*x<p;x++)e.push(v.charAt(g>>>6*(3-x)&63));if(m=v.charAt(64))for(;e.length%4;)e.push(m);return e.join("")},parse:function(e){var m=e.length,r=this._map,v=r.charAt(64);v&&(v=e.indexOf(v),-1!=v&&(m=v));for(var v=[],u=0,g=0;g<m;g++)if(g%
    4){var x=r.indexOf(e.charAt(g-1))<<g%4*2,c=r.indexOf(e.charAt(g))>>>6-g%4*2;v[u>>>2]|=(x|c)<<24-u%4*8;u++}return p.create(v,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
    (function(g){function p(c,e,a,d,l,b,q){c=c+(e&a|~e&d)+l+q;return(c<<b|c>>>32-b)+e}function e(c,e,a,d,l,b,q){c=c+(e&d|a&~d)+l+q;return(c<<b|c>>>32-b)+e}function m(c,e,a,d,l,b,q){c=c+(e^a^d)+l+q;return(c<<b|c>>>32-b)+e}function r(c,e,a,d,l,b,q){c=c+(a^(e|~d))+l+q;return(c<<b|c>>>32-b)+e}for(var v=CryptoJS,u=v.lib,y=u.WordArray,x=u.Hasher,u=v.algo,c=[],w=0;64>w;w++)c[w]=4294967296*g.abs(g.sin(w+1))|0;u=u.MD5=x.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},
    _doProcessBlock:function(t,g){for(var a=0;16>a;a++){var d=g+a,l=t[d];t[d]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var a=this._hash.words,d=t[g+0],l=t[g+1],b=t[g+2],q=t[g+3],B=t[g+4],u=t[g+5],v=t[g+6],x=t[g+7],y=t[g+8],C=t[g+9],D=t[g+10],E=t[g+11],F=t[g+12],G=t[g+13],H=t[g+14],w=t[g+15],f=a[0],n=a[1],h=a[2],k=a[3],f=p(f,n,h,k,d,7,c[0]),k=p(k,f,n,h,l,12,c[1]),h=p(h,k,f,n,b,17,c[2]),n=p(n,h,k,f,q,22,c[3]),f=p(f,n,h,k,B,7,c[4]),k=p(k,f,n,h,u,12,c[5]),h=p(h,k,f,n,v,17,c[6]),n=p(n,h,k,f,x,22,c[7]),
    f=p(f,n,h,k,y,7,c[8]),k=p(k,f,n,h,C,12,c[9]),h=p(h,k,f,n,D,17,c[10]),n=p(n,h,k,f,E,22,c[11]),f=p(f,n,h,k,F,7,c[12]),k=p(k,f,n,h,G,12,c[13]),h=p(h,k,f,n,H,17,c[14]),n=p(n,h,k,f,w,22,c[15]),f=e(f,n,h,k,l,5,c[16]),k=e(k,f,n,h,v,9,c[17]),h=e(h,k,f,n,E,14,c[18]),n=e(n,h,k,f,d,20,c[19]),f=e(f,n,h,k,u,5,c[20]),k=e(k,f,n,h,D,9,c[21]),h=e(h,k,f,n,w,14,c[22]),n=e(n,h,k,f,B,20,c[23]),f=e(f,n,h,k,C,5,c[24]),k=e(k,f,n,h,H,9,c[25]),h=e(h,k,f,n,q,14,c[26]),n=e(n,h,k,f,y,20,c[27]),f=e(f,n,h,k,G,5,c[28]),k=e(k,f,
    n,h,b,9,c[29]),h=e(h,k,f,n,x,14,c[30]),n=e(n,h,k,f,F,20,c[31]),f=m(f,n,h,k,u,4,c[32]),k=m(k,f,n,h,y,11,c[33]),h=m(h,k,f,n,E,16,c[34]),n=m(n,h,k,f,H,23,c[35]),f=m(f,n,h,k,l,4,c[36]),k=m(k,f,n,h,B,11,c[37]),h=m(h,k,f,n,x,16,c[38]),n=m(n,h,k,f,D,23,c[39]),f=m(f,n,h,k,G,4,c[40]),k=m(k,f,n,h,d,11,c[41]),h=m(h,k,f,n,q,16,c[42]),n=m(n,h,k,f,v,23,c[43]),f=m(f,n,h,k,C,4,c[44]),k=m(k,f,n,h,F,11,c[45]),h=m(h,k,f,n,w,16,c[46]),n=m(n,h,k,f,b,23,c[47]),f=r(f,n,h,k,d,6,c[48]),k=r(k,f,n,h,x,10,c[49]),h=r(h,k,f,n,
    H,15,c[50]),n=r(n,h,k,f,u,21,c[51]),f=r(f,n,h,k,F,6,c[52]),k=r(k,f,n,h,q,10,c[53]),h=r(h,k,f,n,D,15,c[54]),n=r(n,h,k,f,l,21,c[55]),f=r(f,n,h,k,y,6,c[56]),k=r(k,f,n,h,w,10,c[57]),h=r(h,k,f,n,v,15,c[58]),n=r(n,h,k,f,G,21,c[59]),f=r(f,n,h,k,B,6,c[60]),k=r(k,f,n,h,E,10,c[61]),h=r(h,k,f,n,b,15,c[62]),n=r(n,h,k,f,C,21,c[63]);a[0]=a[0]+f|0;a[1]=a[1]+n|0;a[2]=a[2]+h|0;a[3]=a[3]+k|0},_doFinalize:function(){var c=this._data,e=c.words,a=8*this._nDataBytes,d=8*c.sigBytes;e[d>>>5]|=128<<24-d%32;var l=g.floor(a/
    4294967296);e[(d+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;e[(d+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;c.sigBytes=4*(e.length+1);this._process();c=this._hash;e=c.words;for(a=0;4>a;a++)d=e[a],e[a]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;return c},clone:function(){var c=x.clone.call(this);c._hash=this._hash.clone();return c}});v.MD5=x._createHelper(u);v.HmacMD5=x._createHmacHelper(u)})(Math);
    (function(){var g=CryptoJS,p=g.lib,e=p.Base,m=p.WordArray,p=g.algo,r=p.EvpKDF=e.extend({cfg:e.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,g){for(var p=this.cfg,r=p.hasher.create(),c=m.create(),w=c.words,t=p.keySize,p=p.iterations;w.length<t;){z&&r.update(z);var z=r.update(e).finalize(g);r.reset();for(var a=1;a<p;a++)z=r.finalize(z),r.reset();c.concat(z)}c.sigBytes=4*t;return c}});g.EvpKDF=function(e,g,m){return r.create(m).compute(e,
    g)}})();
    CryptoJS.lib.Cipher||function(g){var p=CryptoJS,e=p.lib,m=e.Base,r=e.WordArray,v=e.BufferedBlockAlgorithm,u=p.enc.Base64,y=p.algo.EvpKDF,x=e.Cipher=v.extend({cfg:m.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,d){this.cfg=this.cfg.extend(d);this._xformMode=a;this._key=b;this.reset()},reset:function(){v.reset.call(this);this._doReset()},process:function(a){this._append(a);return this._process()},
    finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(l){return{encrypt:function(b,q,c){return("string"==typeof q?d:a).encrypt(l,b,q,c)},decrypt:function(b,q,c){return("string"==typeof q?d:a).decrypt(l,b,q,c)}}}});e.StreamCipher=x.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=p.mode={},w=function(a,b,d){var c=this._iv;c?this._iv=g:c=this._prevBlock;for(var e=0;e<d;e++)a[b+e]^=
    c[e]},t=(e.BlockCipherMode=m.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a;this._iv=b}})).extend();t.Encryptor=t.extend({processBlock:function(a,b){var d=this._cipher,c=d.blockSize;w.call(this,a,b,c);d.encryptBlock(a,b);this._prevBlock=a.slice(b,b+c)}});t.Decryptor=t.extend({processBlock:function(a,b){var d=this._cipher,c=d.blockSize,e=a.slice(b,b+c);d.decryptBlock(a,b);w.call(this,
    a,b,c);this._prevBlock=e}});c=c.CBC=t;t=(p.pad={}).Pkcs7={pad:function(a,b){for(var d=4*b,d=d-a.sigBytes%d,c=d<<24|d<<16|d<<8|d,e=[],g=0;g<d;g+=4)e.push(c);d=r.create(e,d);a.concat(d)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};e.BlockCipher=x.extend({cfg:x.cfg.extend({mode:c,padding:t}),reset:function(){x.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=a.createEncryptor;else d=a.createDecryptor,this._minBufferSize=1;this._mode=d.call(a,
    this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var z=e.CipherParams=m.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),c=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?r.create([1398893684,
    1701076831]).concat(a).concat(b):b).toString(u)},parse:function(a){a=u.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var d=r.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return z.create({ciphertext:a,salt:d})}},a=e.SerializableCipher=m.extend({cfg:m.extend({format:c}),encrypt:function(a,b,d,c){c=this.cfg.extend(c);var e=a.createEncryptor(d,c);b=e.finalize(b);e=e.cfg;return z.create({ciphertext:b,key:d,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding,blockSize:a.blockSize,formatter:c.format})},
    decrypt:function(a,b,d,c){c=this.cfg.extend(c);b=this._parse(b,c.format);return a.createDecryptor(d,c).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,d,c){c||(c=r.random(8));a=y.create({keySize:b+d}).compute(a,c);d=r.create(a.words.slice(b),4*d);a.sigBytes=4*b;return z.create({key:a,iv:d,salt:c})}},d=e.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(d,b,c,e){e=this.cfg.extend(e);c=e.kdf.execute(c,
    d.keySize,d.ivSize);e.iv=c.iv;d=a.encrypt.call(this,d,b,c.key,e);d.mixIn(c);return d},decrypt:function(d,b,c,e){e=this.cfg.extend(e);b=this._parse(b,e.format);c=e.kdf.execute(c,d.keySize,d.ivSize,b.salt);e.iv=c.iv;return a.decrypt.call(this,d,b,c.key,e)}})}();
    (function(){for(var g=CryptoJS,p=g.lib.BlockCipher,e=g.algo,m=[],r=[],v=[],u=[],y=[],x=[],c=[],w=[],t=[],z=[],a=[],d=0;256>d;d++)a[d]=128>d?d<<1:d<<1^283;for(var l=0,b=0,d=0;256>d;d++){var q=b^b<<1^b<<2^b<<3^b<<4,q=q>>>8^q&255^99;m[l]=q;r[q]=l;var B=a[l],I=a[B],J=a[I],A=257*a[q]^16843008*q;v[l]=A<<24|A>>>8;u[l]=A<<16|A>>>16;y[l]=A<<8|A>>>24;x[l]=A;A=16843009*J^65537*I^257*B^16843008*l;c[q]=A<<24|A>>>8;w[q]=A<<16|A>>>16;t[q]=A<<8|A>>>24;z[q]=A;l?(l=B^a[a[a[J^B]]],b^=a[a[b]]):l=b=1}var K=[0,1,2,4,8,
    16,32,64,128,27,54],e=e.AES=p.extend({_doReset:function(){for(var a=this._key,d=a.words,b=a.sigBytes/4,a=4*((this._nRounds=b+6)+1),e=this._keySchedule=[],l=0;l<a;l++)if(l<b)e[l]=d[l];else{var q=e[l-1];l%b?6<b&&4==l%b&&(q=m[q>>>24]<<24|m[q>>>16&255]<<16|m[q>>>8&255]<<8|m[q&255]):(q=q<<8|q>>>24,q=m[q>>>24]<<24|m[q>>>16&255]<<16|m[q>>>8&255]<<8|m[q&255],q^=K[l/b|0]<<24);e[l]=e[l-b]^q}d=this._invKeySchedule=[];for(b=0;b<a;b++)l=a-b,q=b%4?e[l]:e[l-4],d[b]=4>b||4>=l?q:c[m[q>>>24]]^w[m[q>>>16&255]]^t[m[q>>>
    8&255]]^z[m[q&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,v,u,y,x,m)},decryptBlock:function(a,b){var d=a[b+1];a[b+1]=a[b+3];a[b+3]=d;this._doCryptBlock(a,b,this._invKeySchedule,c,w,t,z,r);d=a[b+1];a[b+1]=a[b+3];a[b+3]=d},_doCryptBlock:function(a,b,d,c,e,l,q,f){for(var n=this._nRounds,h=a[b]^d[0],k=a[b+1]^d[1],g=a[b+2]^d[2],m=a[b+3]^d[3],p=4,u=1;u<n;u++)var r=c[h>>>24]^e[k>>>16&255]^l[g>>>8&255]^q[m&255]^d[p++],t=c[k>>>24]^e[g>>>16&255]^l[m>>>8&255]^q[h&255]^d[p++],v=
    c[g>>>24]^e[m>>>16&255]^l[h>>>8&255]^q[k&255]^d[p++],m=c[m>>>24]^e[h>>>16&255]^l[k>>>8&255]^q[g&255]^d[p++],h=r,k=t,g=v;r=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[g>>>8&255]<<8|f[m&255])^d[p++];t=(f[k>>>24]<<24|f[g>>>16&255]<<16|f[m>>>8&255]<<8|f[h&255])^d[p++];v=(f[g>>>24]<<24|f[m>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^d[p++];m=(f[m>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[g&255])^d[p++];a[b]=r;a[b+1]=t;a[b+2]=v;a[b+3]=m},keySize:8});g.AES=p._createHelper(e)})();
    CryptoJS=CryptoJS||function(g,p){var e={},m=e.lib={},r=function(){},v=m.Base={extend:function(a){r.prototype=this;var d=new r;a&&d.mixIn(a);d.hasOwnProperty("init")||(d.init=function(){d.$super.init.apply(this,arguments)});d.init.prototype=d;d.$super=this;return d},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var d in a)a.hasOwnProperty(d)&&(this[d]=a[d]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
    u=m.WordArray=v.extend({init:function(a,d){a=this.words=a||[];this.sigBytes=d!=p?d:4*a.length},toString:function(a){return(a||x).stringify(this)},concat:function(a){var d=this.words,c=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e<a;e++)d[b+e>>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(b+e)%4*8;else if(65535<c.length)for(e=0;e<a;e+=4)d[b+e>>>2]=c[e>>>2];else d.push.apply(d,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,d=this.sigBytes;a[d>>>2]&=4294967295<<32-
    d%4*8;a.length=g.ceil(d/4)},clone:function(){var a=v.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var d=[],c=0;c<a;c+=4)d.push(4294967296*g.random()|0);return new u.init(d,a)}}),y=e.enc={},x=y.Hex={stringify:function(a){var d=a.words;a=a.sigBytes;for(var c=[],b=0;b<a;b++){var e=d[b>>>2]>>>24-b%4*8&255;c.push((e>>>4).toString(16));c.push((e&15).toString(16))}return c.join("")},parse:function(a){for(var d=a.length,c=[],b=0;b<d;b+=2)c[b>>>3]|=parseInt(a.substr(b,2),16)<<
    24-b%8*4;return new u.init(c,d/2)}},c=y.Latin1={stringify:function(a){var d=a.words;a=a.sigBytes;for(var c=[],b=0;b<a;b++)c.push(String.fromCharCode(d[b>>>2]>>>24-b%4*8&255));return c.join("")},parse:function(a){for(var d=a.length,c=[],b=0;b<d;b++)c[b>>>2]|=(a.charCodeAt(b)&255)<<24-b%4*8;return new u.init(c,d)}},w=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(d){throw Error("Malformed UTF-8 data");}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},
    t=m.BufferedBlockAlgorithm=v.extend({reset:function(){this._data=new u.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=w.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var d=this._data,c=d.words,b=d.sigBytes,e=this.blockSize,m=b/(4*e),m=a?g.ceil(m):g.max((m|0)-this._minBufferSize,0);a=m*e;b=g.min(4*a,b);if(a){for(var p=0;p<a;p+=e)this._doProcessBlock(c,p);p=c.splice(0,a);d.sigBytes-=b}return new u.init(p,b)},clone:function(){var a=v.clone.call(this);
    a._data=this._data.clone();return a},_minBufferSize:0});m.Hasher=t.extend({cfg:v.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){t.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(d,c){return(new a.init(c)).finalize(d)}},_createHmacHelper:function(a){return function(d,c){return(new z.HMAC.init(a,
    c)).finalize(d)}}});var z=e.algo={};return e}(Math);
    (function(g){for(var p=CryptoJS,e=p.lib,m=e.WordArray,r=e.Hasher,e=p.algo,v=[],u=[],y=function(a){return 4294967296*(a-(a|0))|0},x=2,c=0;64>c;){var w;a:{w=x;for(var t=g.sqrt(w),z=2;z<=t;z++)if(!(w%z)){w=!1;break a}w=!0}w&&(8>c&&(v[c]=y(g.pow(x,.5))),u[c]=y(g.pow(x,1/3)),c++);x++}var a=[],e=e.SHA256=r.extend({_doReset:function(){this._hash=new m.init(v.slice(0))},_doProcessBlock:function(d,c){for(var b=this._hash.words,e=b[0],g=b[1],m=b[2],p=b[3],r=b[4],t=b[5],v=b[6],x=b[7],w=0;64>w;w++){if(16>w)a[w]=
    d[c+w]|0;else{var y=a[w-15],z=a[w-2];a[w]=((y<<25|y>>>7)^(y<<14|y>>>18)^y>>>3)+a[w-7]+((z<<15|z>>>17)^(z<<13|z>>>19)^z>>>10)+a[w-16]}y=x+((r<<26|r>>>6)^(r<<21|r>>>11)^(r<<7|r>>>25))+(r&t^~r&v)+u[w]+a[w];z=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&g^e&m^g&m);x=v;v=t;t=r;r=p+y|0;p=m;m=g;g=e;e=y+z|0}b[0]=b[0]+e|0;b[1]=b[1]+g|0;b[2]=b[2]+m|0;b[3]=b[3]+p|0;b[4]=b[4]+r|0;b[5]=b[5]+t|0;b[6]=b[6]+v|0;b[7]=b[7]+x|0},_doFinalize:function(){var a=this._data,c=a.words,b=8*this._nDataBytes,e=8*a.sigBytes;
    c[e>>>5]|=128<<24-e%32;c[(e+64>>>9<<4)+14]=g.floor(b/4294967296);c[(e+64>>>9<<4)+15]=b;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a}});p.SHA256=r._createHelper(e);p.HmacSHA256=r._createHmacHelper(e)})(Math);
    /*=============================================================
      Crypto API is set up down here so it's easy to update 
      whenever there is a security update 
    =============================================================*/
    var Crypto = function(){
      /* by: Cody Kochmann */
      this.encrypt = function(g,p){return CryptoJS.AES.encrypt(g,Crypto.hash(p))};
      this.decrypt = function(g,p){return CryptoJS.AES.decrypt(g,Crypto.hash(p))};
      this.hash = function(g){return CryptoJS.SHA256(g)};
    }
    window.Crypto = new Crypto();
    })();
    
    
    • Public Snippets
    • Channels Snippets