package com.jun.apt.util;

public class CryptoJs {

    public static String content;

    static {
        StringBuilder sb = new StringBuilder();
        sb.append(";(function (root, factory) {\n");
        sb.append("\tif (typeof exports === \"object\") {\n");
        sb.append("\t\t// CommonJS\n");
        sb.append("\t\tmodule.exports = exports = factory();\n");
        sb.append("\t}\n");
        sb.append("\telse if (typeof define === \"function\" && define.amd) {\n");
        sb.append("\t\t// AMD\n");
        sb.append("\t\tdefine([], factory);\n");
        sb.append("\t}\n");
        sb.append("\telse {\n");
        sb.append("\t\t// Global (browser)\n");
        sb.append("\t\troot.CryptoJS = factory();\n");
        sb.append("\t}\n");
        sb.append("}(this, function () {\n");
        sb.append("\n");
        sb.append("\t/*globals window, global, require*/\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * CryptoJS core components.\n");
        sb.append("\t */\n");
        sb.append("\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n");
        sb.append("\n");
        sb.append("\t    var crypto;\n");
        sb.append("\n");
        sb.append("\t    // Native crypto from window (Browser)\n");
        sb.append("\t    if (typeof window !== 'undefined' && window.crypto) {\n");
        sb.append("\t        crypto = window.crypto;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Native crypto in web worker (Browser)\n");
        sb.append("\t    if (typeof self !== 'undefined' && self.crypto) {\n");
        sb.append("\t        crypto = self.crypto;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Native crypto from worker\n");
        sb.append("\t    if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n");
        sb.append("\t        crypto = globalThis.crypto;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Native (experimental IE 11) crypto from window (Browser)\n");
        sb.append("\t    if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n");
        sb.append("\t        crypto = window.msCrypto;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Native crypto from global (NodeJS)\n");
        sb.append("\t    if (!crypto && typeof global !== 'undefined' && global.crypto) {\n");
        sb.append("\t        crypto = global.crypto;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Native crypto import via require (NodeJS)\n");
        sb.append("\t    if (!crypto && typeof require === 'function') {\n");
        sb.append("\t        try {\n");
        sb.append("\t            crypto = require('crypto');\n");
        sb.append("\t        } catch (err) {}\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /*\n");
        sb.append("\t     * Cryptographically secure pseudorandom number generator\n");
        sb.append("\t     *\n");
        sb.append("\t     * As Math.random() is cryptographically not safe to use\n");
        sb.append("\t     */\n");
        sb.append("\t    var cryptoSecureRandomInt = function () {\n");
        sb.append("\t        if (crypto) {\n");
        sb.append("\t            // Use getRandomValues method (Browser)\n");
        sb.append("\t            if (typeof crypto.getRandomValues === 'function') {\n");
        sb.append("\t                try {\n");
        sb.append("\t                    return crypto.getRandomValues(new Uint32Array(1))[0];\n");
        sb.append("\t                } catch (err) {}\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Use randomBytes method (NodeJS)\n");
        sb.append("\t            if (typeof crypto.randomBytes === 'function') {\n");
        sb.append("\t                try {\n");
        sb.append("\t                    return crypto.randomBytes(4).readInt32LE();\n");
        sb.append("\t                } catch (err) {}\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        throw new Error('Native crypto module could not be used to get secure random number.');\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /*\n");
        sb.append("\t     * Local polyfill of Object.create\n");
        sb.append("\n");
        sb.append("\t     */\n");
        sb.append("\t    var create = Object.create || (function () {\n");
        sb.append("\t        function F() {}\n");
        sb.append("\n");
        sb.append("\t        return function (obj) {\n");
        sb.append("\t            var subtype;\n");
        sb.append("\n");
        sb.append("\t            F.prototype = obj;\n");
        sb.append("\n");
        sb.append("\t            subtype = new F();\n");
        sb.append("\n");
        sb.append("\t            F.prototype = null;\n");
        sb.append("\n");
        sb.append("\t            return subtype;\n");
        sb.append("\t        };\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * CryptoJS namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Library namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_lib = C.lib = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Base object for prototypal inheritance.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Base = C_lib.Base = (function () {\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t        return {\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Creates a new object that inherits from this object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @param {Object} overrides Properties to copy into the new object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @return {Object} The new object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @static\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     var MyType = CryptoJS.lib.Base.extend({\n");
        sb.append("\t             *         field: 'value',\n");
        sb.append("\t             *\n");
        sb.append("\t             *         method: function () {\n");
        sb.append("\t             *         }\n");
        sb.append("\t             *     });\n");
        sb.append("\t             */\n");
        sb.append("\t            extend: function (overrides) {\n");
        sb.append("\t                // Spawn\n");
        sb.append("\t                var subtype = create(this);\n");
        sb.append("\n");
        sb.append("\t                // Augment\n");
        sb.append("\t                if (overrides) {\n");
        sb.append("\t                    subtype.mixIn(overrides);\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Create default initializer\n");
        sb.append("\t                if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n");
        sb.append("\t                    subtype.init = function () {\n");
        sb.append("\t                        subtype.$super.init.apply(this, arguments);\n");
        sb.append("\t                    };\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Initializer's prototype is the subtype object\n");
        sb.append("\t                subtype.init.prototype = subtype;\n");
        sb.append("\n");
        sb.append("\t                // Reference supertype\n");
        sb.append("\t                subtype.$super = this;\n");
        sb.append("\n");
        sb.append("\t                return subtype;\n");
        sb.append("\t            },\n");
        sb.append("\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Extends this object and runs the init method.\n");
        sb.append("\t             * Arguments to create() will be passed to init().\n");
        sb.append("\t             *\n");
        sb.append("\t             * @return {Object} The new object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @static\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     var instance = MyType.create();\n");
        sb.append("\t             */\n");
        sb.append("\t            create: function () {\n");
        sb.append("\t                var instance = this.extend();\n");
        sb.append("\t                instance.init.apply(instance, arguments);\n");
        sb.append("\n");
        sb.append("\t                return instance;\n");
        sb.append("\t            },\n");
        sb.append("\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Initializes a newly created object.\n");
        sb.append("\t             * Override this method to add some logic when your objects are created.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     var MyType = CryptoJS.lib.Base.extend({\n");
        sb.append("\t             *         init: function () {\n");
        sb.append("\t             *             // ...\n");
        sb.append("\t             *         }\n");
        sb.append("\t             *     });\n");
        sb.append("\t             */\n");
        sb.append("\t            init: function () {\n");
        sb.append("\t            },\n");
        sb.append("\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Copies properties into this object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @param {Object} properties The properties to mix in.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     MyType.mixIn({\n");
        sb.append("\t             *         field: 'value'\n");
        sb.append("\t             *     });\n");
        sb.append("\t             */\n");
        sb.append("\t            mixIn: function (properties) {\n");
        sb.append("\t                for (var propertyName in properties) {\n");
        sb.append("\t                    if (properties.hasOwnProperty(propertyName)) {\n");
        sb.append("\t                        this[propertyName] = properties[propertyName];\n");
        sb.append("\t                    }\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // IE won't copy toString using the loop above\n");
        sb.append("\t                if (properties.hasOwnProperty('toString')) {\n");
        sb.append("\t                    this.toString = properties.toString;\n");
        sb.append("\t                }\n");
        sb.append("\t            },\n");
        sb.append("\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Creates a copy of this object.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @return {Object} The clone.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     var clone = instance.clone();\n");
        sb.append("\t             */\n");
        sb.append("\t            clone: function () {\n");
        sb.append("\t                return this.init.prototype.extend(this);\n");
        sb.append("\t            }\n");
        sb.append("\t        };\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * An array of 32-bit words.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {Array} words The array of 32-bit words.\n");
        sb.append("\t     * @property {number} sigBytes The number of significant bytes in this word array.\n");
        sb.append("\t     */\n");
        sb.append("\t    var WordArray = C_lib.WordArray = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Array} words (Optional) An array of 32-bit words.\n");
        sb.append("\t         * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.lib.WordArray.create();\n");
        sb.append("\t         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n");
        sb.append("\t         *     var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (words, sigBytes) {\n");
        sb.append("\t            words = this.words = words || [];\n");
        sb.append("\n");
        sb.append("\t            if (sigBytes != undefined) {\n");
        sb.append("\t                this.sigBytes = sigBytes;\n");
        sb.append("\t            } else {\n");
        sb.append("\t                this.sigBytes = words.length * 4;\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts this word array to a string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The stringified word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var string = wordArray + '';\n");
        sb.append("\t         *     var string = wordArray.toString();\n");
        sb.append("\t         *     var string = wordArray.toString(CryptoJS.enc.Utf8);\n");
        sb.append("\t         */\n");
        sb.append("\t        toString: function (encoder) {\n");
        sb.append("\t            return (encoder || Hex).stringify(this);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Concatenates a word array to this word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array to append.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} This word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     wordArray1.concat(wordArray2);\n");
        sb.append("\t         */\n");
        sb.append("\t        concat: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var thisWords = this.words;\n");
        sb.append("\t            var thatWords = wordArray.words;\n");
        sb.append("\t            var thisSigBytes = this.sigBytes;\n");
        sb.append("\t            var thatSigBytes = wordArray.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Clamp excess bits\n");
        sb.append("\t            this.clamp();\n");
        sb.append("\n");
        sb.append("\t            // Concat\n");
        sb.append("\t            if (thisSigBytes % 4) {\n");
        sb.append("\t                // Copy one byte at a time\n");
        sb.append("\t                for (var i = 0; i < thatSigBytes; i++) {\n");
        sb.append("\t                    var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n");
        sb.append("\t                    thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n");
        sb.append("\t                }\n");
        sb.append("\t            } else {\n");
        sb.append("\t                // Copy one word at a time\n");
        sb.append("\t                for (var j = 0; j < thatSigBytes; j += 4) {\n");
        sb.append("\t                    thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\t            this.sigBytes += thatSigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Chainable\n");
        sb.append("\t            return this;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Removes insignificant bits.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     wordArray.clamp();\n");
        sb.append("\t         */\n");
        sb.append("\t        clamp: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = this.words;\n");
        sb.append("\t            var sigBytes = this.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Clamp\n");
        sb.append("\t            words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n");
        sb.append("\t            words.length = Math.ceil(sigBytes / 4);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a copy of this word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The clone.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var clone = wordArray.clone();\n");
        sb.append("\t         */\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Base.clone.call(this);\n");
        sb.append("\t            clone.words = this.words.slice(0);\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a word array filled with random bytes.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} nBytes The number of random bytes to generate.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The random word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.lib.WordArray.random(16);\n");
        sb.append("\t         */\n");
        sb.append("\t        random: function (nBytes) {\n");
        sb.append("\t            var words = [];\n");
        sb.append("\n");
        sb.append("\t            for (var i = 0; i < nBytes; i += 4) {\n");
        sb.append("\t                words.push(cryptoSecureRandomInt());\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return new WordArray.init(words, nBytes);\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Encoder namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_enc = C.enc = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Hex encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Hex = C_enc.Hex = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a hex string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The hex string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var hexChars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i++) {\n");
        sb.append("\t                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n");
        sb.append("\t                hexChars.push((bite >>> 4).toString(16));\n");
        sb.append("\t                hexChars.push((bite & 0x0f).toString(16));\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return hexChars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a hex string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} hexStr The hex string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Hex.parse(hexString);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (hexStr) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var hexStrLength = hexStr.length;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var words = [];\n");
        sb.append("\t            for (var i = 0; i < hexStrLength; i += 2) {\n");
        sb.append("\t                words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return new WordArray.init(words, hexStrLength / 2);\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Latin1 encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Latin1 = C_enc.Latin1 = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a Latin1 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The Latin1 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var latin1Chars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i++) {\n");
        sb.append("\t                var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n");
        sb.append("\t                latin1Chars.push(String.fromCharCode(bite));\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return latin1Chars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a Latin1 string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} latin1Str The Latin1 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (latin1Str) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var latin1StrLength = latin1Str.length;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var words = [];\n");
        sb.append("\t            for (var i = 0; i < latin1StrLength; i++) {\n");
        sb.append("\t                words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return new WordArray.init(words, latin1StrLength);\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * UTF-8 encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Utf8 = C_enc.Utf8 = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a UTF-8 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The UTF-8 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            try {\n");
        sb.append("\t                return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n");
        sb.append("\t            } catch (e) {\n");
        sb.append("\t                throw new Error('Malformed UTF-8 data');\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a UTF-8 string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} utf8Str The UTF-8 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (utf8Str) {\n");
        sb.append("\t            return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract buffered block algorithm template.\n");
        sb.append("\t     *\n");
        sb.append("\t     * The property blockSize must be implemented in a concrete subtype.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n");
        sb.append("\t     */\n");
        sb.append("\t    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Resets this block algorithm's data buffer to its initial state.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     bufferedBlockAlgorithm.reset();\n");
        sb.append("\t         */\n");
        sb.append("\t        reset: function () {\n");
        sb.append("\t            // Initial values\n");
        sb.append("\t            this._data = new WordArray.init();\n");
        sb.append("\t            this._nDataBytes = 0;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Adds new data to this block algorithm's buffer.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     bufferedBlockAlgorithm._append('data');\n");
        sb.append("\t         *     bufferedBlockAlgorithm._append(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        _append: function (data) {\n");
        sb.append("\t            // Convert string to WordArray, else assume WordArray already\n");
        sb.append("\t            if (typeof data == 'string') {\n");
        sb.append("\t                data = Utf8.parse(data);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Append\n");
        sb.append("\t            this._data.concat(data);\n");
        sb.append("\t            this._nDataBytes += data.sigBytes;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Processes available data blocks.\n");
        sb.append("\t         *\n");
        sb.append("\t         * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The processed data.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var processedData = bufferedBlockAlgorithm._process();\n");
        sb.append("\t         *     var processedData = bufferedBlockAlgorithm._process(!!'flush');\n");
        sb.append("\t         */\n");
        sb.append("\t        _process: function (doFlush) {\n");
        sb.append("\t            var processedWords;\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\t            var dataSigBytes = data.sigBytes;\n");
        sb.append("\t            var blockSize = this.blockSize;\n");
        sb.append("\t            var blockSizeBytes = blockSize * 4;\n");
        sb.append("\n");
        sb.append("\t            // Count blocks ready\n");
        sb.append("\t            var nBlocksReady = dataSigBytes / blockSizeBytes;\n");
        sb.append("\t            if (doFlush) {\n");
        sb.append("\t                // Round up to include partial blocks\n");
        sb.append("\t                nBlocksReady = Math.ceil(nBlocksReady);\n");
        sb.append("\t            } else {\n");
        sb.append("\t                // Round down to include only full blocks,\n");
        sb.append("\t                // less the number of blocks that must remain in the buffer\n");
        sb.append("\t                nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Count words ready\n");
        sb.append("\t            var nWordsReady = nBlocksReady * blockSize;\n");
        sb.append("\n");
        sb.append("\t            // Count bytes ready\n");
        sb.append("\t            var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n");
        sb.append("\n");
        sb.append("\t            // Process blocks\n");
        sb.append("\t            if (nWordsReady) {\n");
        sb.append("\t                for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n");
        sb.append("\t                    // Perform concrete-algorithm logic\n");
        sb.append("\t                    this._doProcessBlock(dataWords, offset);\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Remove processed words\n");
        sb.append("\t                processedWords = dataWords.splice(0, nWordsReady);\n");
        sb.append("\t                data.sigBytes -= nBytesReady;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Return processed words\n");
        sb.append("\t            return new WordArray.init(processedWords, nBytesReady);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a copy of this object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Object} The clone.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var clone = bufferedBlockAlgorithm.clone();\n");
        sb.append("\t         */\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Base.clone.call(this);\n");
        sb.append("\t            clone._data = this._data.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _minBufferSize: 0\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract hasher template.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n");
        sb.append("\t     */\n");
        sb.append("\t    var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Base.extend(),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created hasher.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hasher = CryptoJS.algo.SHA256.create();\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            this.cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Set initial values\n");
        sb.append("\t            this.reset();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Resets this hasher to its initial state.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     hasher.reset();\n");
        sb.append("\t         */\n");
        sb.append("\t        reset: function () {\n");
        sb.append("\t            // Reset data buffer\n");
        sb.append("\t            BufferedBlockAlgorithm.reset.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Perform concrete-hasher logic\n");
        sb.append("\t            this._doReset();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Updates this hasher with a message.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} messageUpdate The message to append.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Hasher} This hasher.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     hasher.update('message');\n");
        sb.append("\t         *     hasher.update(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        update: function (messageUpdate) {\n");
        sb.append("\t            // Append\n");
        sb.append("\t            this._append(messageUpdate);\n");
        sb.append("\n");
        sb.append("\t            // Update the hash\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Chainable\n");
        sb.append("\t            return this;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Finalizes the hash computation.\n");
        sb.append("\t         * Note that the finalize operation is effectively a destructive, read-once operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} messageUpdate (Optional) A final message update.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The hash.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hash = hasher.finalize();\n");
        sb.append("\t         *     var hash = hasher.finalize('message');\n");
        sb.append("\t         *     var hash = hasher.finalize(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        finalize: function (messageUpdate) {\n");
        sb.append("\t            // Final message update\n");
        sb.append("\t            if (messageUpdate) {\n");
        sb.append("\t                this._append(messageUpdate);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Perform concrete-hasher logic\n");
        sb.append("\t            var hash = this._doFinalize();\n");
        sb.append("\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 512/32,\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a shortcut function to a hasher's object interface.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Hasher} hasher The hasher to create a helper for.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Function} The shortcut function.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n");
        sb.append("\t         */\n");
        sb.append("\t        _createHelper: function (hasher) {\n");
        sb.append("\t            return function (message, cfg) {\n");
        sb.append("\t                return new hasher.init(cfg).finalize(message);\n");
        sb.append("\t            };\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a shortcut function to the HMAC's object interface.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Hasher} hasher The hasher to use in this HMAC helper.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Function} The shortcut function.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n");
        sb.append("\t         */\n");
        sb.append("\t        _createHmacHelper: function (hasher) {\n");
        sb.append("\t            return function (message, key) {\n");
        sb.append("\t                return new C_algo.HMAC.init(hasher, key).finalize(message);\n");
        sb.append("\t            };\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Algorithm namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_algo = C.algo = {};\n");
        sb.append("\n");
        sb.append("\t    return C;\n");
        sb.append("\t}(Math));\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function (undefined) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Base = C_lib.Base;\n");
        sb.append("\t    var X32WordArray = C_lib.WordArray;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * x64 namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_x64 = C.x64 = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * A 64-bit word.\n");
        sb.append("\t     */\n");
        sb.append("\t    var X64Word = C_x64.Word = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created 64-bit word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} high The high 32 bits.\n");
        sb.append("\t         * @param {number} low The low 32 bits.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (high, low) {\n");
        sb.append("\t            this.high = high;\n");
        sb.append("\t            this.low = low;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Bitwise NOTs this word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after negating.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var negated = x64Word.not();\n");
        sb.append("\t         */\n");
        sb.append("\t        // not: function () {\n");
        sb.append("\t            // var high = ~this.high;\n");
        sb.append("\t            // var low = ~this.low;\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Bitwise ANDs this word with the passed word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {X64Word} word The x64-Word to AND with this word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after ANDing.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var anded = x64Word.and(anotherX64Word);\n");
        sb.append("\t         */\n");
        sb.append("\t        // and: function (word) {\n");
        sb.append("\t            // var high = this.high & word.high;\n");
        sb.append("\t            // var low = this.low & word.low;\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Bitwise ORs this word with the passed word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {X64Word} word The x64-Word to OR with this word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after ORing.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var ored = x64Word.or(anotherX64Word);\n");
        sb.append("\t         */\n");
        sb.append("\t        // or: function (word) {\n");
        sb.append("\t            // var high = this.high | word.high;\n");
        sb.append("\t            // var low = this.low | word.low;\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Bitwise XORs this word with the passed word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {X64Word} word The x64-Word to XOR with this word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after XORing.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var xored = x64Word.xor(anotherX64Word);\n");
        sb.append("\t         */\n");
        sb.append("\t        // xor: function (word) {\n");
        sb.append("\t            // var high = this.high ^ word.high;\n");
        sb.append("\t            // var low = this.low ^ word.low;\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Shifts this word n bits to the left.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} n The number of bits to shift.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after shifting.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var shifted = x64Word.shiftL(25);\n");
        sb.append("\t         */\n");
        sb.append("\t        // shiftL: function (n) {\n");
        sb.append("\t            // if (n < 32) {\n");
        sb.append("\t                // var high = (this.high << n) | (this.low >>> (32 - n));\n");
        sb.append("\t                // var low = this.low << n;\n");
        sb.append("\t            // } else {\n");
        sb.append("\t                // var high = this.low << (n - 32);\n");
        sb.append("\t                // var low = 0;\n");
        sb.append("\t            // }\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Shifts this word n bits to the right.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} n The number of bits to shift.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after shifting.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var shifted = x64Word.shiftR(7);\n");
        sb.append("\t         */\n");
        sb.append("\t        // shiftR: function (n) {\n");
        sb.append("\t            // if (n < 32) {\n");
        sb.append("\t                // var low = (this.low >>> n) | (this.high << (32 - n));\n");
        sb.append("\t                // var high = this.high >>> n;\n");
        sb.append("\t            // } else {\n");
        sb.append("\t                // var low = this.high >>> (n - 32);\n");
        sb.append("\t                // var high = 0;\n");
        sb.append("\t            // }\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Rotates this word n bits to the left.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} n The number of bits to rotate.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after rotating.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var rotated = x64Word.rotL(25);\n");
        sb.append("\t         */\n");
        sb.append("\t        // rotL: function (n) {\n");
        sb.append("\t            // return this.shiftL(n).or(this.shiftR(64 - n));\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Rotates this word n bits to the right.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} n The number of bits to rotate.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after rotating.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var rotated = x64Word.rotR(7);\n");
        sb.append("\t         */\n");
        sb.append("\t        // rotR: function (n) {\n");
        sb.append("\t            // return this.shiftR(n).or(this.shiftL(64 - n));\n");
        sb.append("\t        // },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Adds this word with the passed word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {X64Word} word The x64-Word to add with this word.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64Word} A new x64-Word object after adding.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var added = x64Word.add(anotherX64Word);\n");
        sb.append("\t         */\n");
        sb.append("\t        // add: function (word) {\n");
        sb.append("\t            // var low = (this.low + word.low) | 0;\n");
        sb.append("\t            // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n");
        sb.append("\t            // var high = (this.high + word.high + carry) | 0;\n");
        sb.append("\n");
        sb.append("\t            // return X64Word.create(high, low);\n");
        sb.append("\t        // }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * An array of 64-bit words.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {Array} words The array of CryptoJS.x64.Word objects.\n");
        sb.append("\t     * @property {number} sigBytes The number of significant bytes in this word array.\n");
        sb.append("\t     */\n");
        sb.append("\t    var X64WordArray = C_x64.WordArray = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n");
        sb.append("\t         * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.x64.WordArray.create();\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.x64.WordArray.create([\n");
        sb.append("\t         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n");
        sb.append("\t         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n");
        sb.append("\t         *     ]);\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.x64.WordArray.create([\n");
        sb.append("\t         *         CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n");
        sb.append("\t         *         CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n");
        sb.append("\t         *     ], 10);\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (words, sigBytes) {\n");
        sb.append("\t            words = this.words = words || [];\n");
        sb.append("\n");
        sb.append("\t            if (sigBytes != undefined) {\n");
        sb.append("\t                this.sigBytes = sigBytes;\n");
        sb.append("\t            } else {\n");
        sb.append("\t                this.sigBytes = words.length * 8;\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts this 64-bit word array to a 32-bit word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var x32WordArray = x64WordArray.toX32();\n");
        sb.append("\t         */\n");
        sb.append("\t        toX32: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var x64Words = this.words;\n");
        sb.append("\t            var x64WordsLength = x64Words.length;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var x32Words = [];\n");
        sb.append("\t            for (var i = 0; i < x64WordsLength; i++) {\n");
        sb.append("\t                var x64Word = x64Words[i];\n");
        sb.append("\t                x32Words.push(x64Word.high);\n");
        sb.append("\t                x32Words.push(x64Word.low);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return X32WordArray.create(x32Words, this.sigBytes);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates a copy of this word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {X64WordArray} The clone.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var clone = x64WordArray.clone();\n");
        sb.append("\t         */\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Base.clone.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Clone \"words\" array\n");
        sb.append("\t            var words = clone.words = this.words.slice(0);\n");
        sb.append("\n");
        sb.append("\t            // Clone each X64Word object\n");
        sb.append("\t            var wordsLength = words.length;\n");
        sb.append("\t            for (var i = 0; i < wordsLength; i++) {\n");
        sb.append("\t                words[i] = words[i].clone();\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Check if typed arrays are supported\n");
        sb.append("\t    if (typeof ArrayBuffer != 'function') {\n");
        sb.append("\t        return;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\n");
        sb.append("\t    // Reference original init\n");
        sb.append("\t    var superInit = WordArray.init;\n");
        sb.append("\n");
        sb.append("\t    // Augment WordArray.init to handle typed arrays\n");
        sb.append("\t    var subInit = WordArray.init = function (typedArray) {\n");
        sb.append("\t        // Convert buffers to uint8\n");
        sb.append("\t        if (typedArray instanceof ArrayBuffer) {\n");
        sb.append("\t            typedArray = new Uint8Array(typedArray);\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Convert other array views to uint8\n");
        sb.append("\t        if (\n");
        sb.append("\t            typedArray instanceof Int8Array ||\n");
        sb.append("\t            (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n");
        sb.append("\t            typedArray instanceof Int16Array ||\n");
        sb.append("\t            typedArray instanceof Uint16Array ||\n");
        sb.append("\t            typedArray instanceof Int32Array ||\n");
        sb.append("\t            typedArray instanceof Uint32Array ||\n");
        sb.append("\t            typedArray instanceof Float32Array ||\n");
        sb.append("\t            typedArray instanceof Float64Array\n");
        sb.append("\t        ) {\n");
        sb.append("\t            typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Handle Uint8Array\n");
        sb.append("\t        if (typedArray instanceof Uint8Array) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var typedArrayByteLength = typedArray.byteLength;\n");
        sb.append("\n");
        sb.append("\t            // Extract bytes\n");
        sb.append("\t            var words = [];\n");
        sb.append("\t            for (var i = 0; i < typedArrayByteLength; i++) {\n");
        sb.append("\t                words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Initialize this word array\n");
        sb.append("\t            superInit.call(this, words, typedArrayByteLength);\n");
        sb.append("\t        } else {\n");
        sb.append("\t            // Else call normal init\n");
        sb.append("\t            superInit.apply(this, arguments);\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    subInit.prototype = WordArray;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * UTF-16 BE encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a UTF-16 BE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The UTF-16 BE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var utf16Chars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i += 2) {\n");
        sb.append("\t                var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n");
        sb.append("\t                utf16Chars.push(String.fromCharCode(codePoint));\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return utf16Chars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a UTF-16 BE string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} utf16Str The UTF-16 BE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (utf16Str) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var utf16StrLength = utf16Str.length;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var words = [];\n");
        sb.append("\t            for (var i = 0; i < utf16StrLength; i++) {\n");
        sb.append("\t                words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return WordArray.create(words, utf16StrLength * 2);\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * UTF-16 LE encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    C_enc.Utf16LE = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a UTF-16 LE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The UTF-16 LE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var utf16Chars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i += 2) {\n");
        sb.append("\t                var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n");
        sb.append("\t                utf16Chars.push(String.fromCharCode(codePoint));\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return utf16Chars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a UTF-16 LE string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} utf16Str The UTF-16 LE string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (utf16Str) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var utf16StrLength = utf16Str.length;\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var words = [];\n");
        sb.append("\t            for (var i = 0; i < utf16StrLength; i++) {\n");
        sb.append("\t                words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return WordArray.create(words, utf16StrLength * 2);\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    function swapEndian(word) {\n");
        sb.append("\t        return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n");
        sb.append("\t    }\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Base64 encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Base64 = C_enc.Base64 = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a Base64 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The Base64 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\t            var map = this._map;\n");
        sb.append("\n");
        sb.append("\t            // Clamp excess bits\n");
        sb.append("\t            wordArray.clamp();\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var base64Chars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i += 3) {\n");
        sb.append("\t                var byte1 = (words[i >>> 2]       >>> (24 - (i % 4) * 8))       & 0xff;\n");
        sb.append("\t                var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n");
        sb.append("\t                var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n");
        sb.append("\n");
        sb.append("\t                var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n");
        sb.append("\n");
        sb.append("\t                for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n");
        sb.append("\t                    base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            var paddingChar = map.charAt(64);\n");
        sb.append("\t            if (paddingChar) {\n");
        sb.append("\t                while (base64Chars.length % 4) {\n");
        sb.append("\t                    base64Chars.push(paddingChar);\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return base64Chars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a Base64 string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} base64Str The Base64 string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Base64.parse(base64String);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (base64Str) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var base64StrLength = base64Str.length;\n");
        sb.append("\t            var map = this._map;\n");
        sb.append("\t            var reverseMap = this._reverseMap;\n");
        sb.append("\n");
        sb.append("\t            if (!reverseMap) {\n");
        sb.append("\t                    reverseMap = this._reverseMap = [];\n");
        sb.append("\t                    for (var j = 0; j < map.length; j++) {\n");
        sb.append("\t                        reverseMap[map.charCodeAt(j)] = j;\n");
        sb.append("\t                    }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Ignore padding\n");
        sb.append("\t            var paddingChar = map.charAt(64);\n");
        sb.append("\t            if (paddingChar) {\n");
        sb.append("\t                var paddingIndex = base64Str.indexOf(paddingChar);\n");
        sb.append("\t                if (paddingIndex !== -1) {\n");
        sb.append("\t                    base64StrLength = paddingIndex;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            return parseLoop(base64Str, base64StrLength, reverseMap);\n");
        sb.append("\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    function parseLoop(base64Str, base64StrLength, reverseMap) {\n");
        sb.append("\t      var words = [];\n");
        sb.append("\t      var nBytes = 0;\n");
        sb.append("\t      for (var i = 0; i < base64StrLength; i++) {\n");
        sb.append("\t          if (i % 4) {\n");
        sb.append("\t              var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n");
        sb.append("\t              var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n");
        sb.append("\t              var bitsCombined = bits1 | bits2;\n");
        sb.append("\t              words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n");
        sb.append("\t              nBytes++;\n");
        sb.append("\t          }\n");
        sb.append("\t      }\n");
        sb.append("\t      return WordArray.create(words, nBytes);\n");
        sb.append("\t    }\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Base64url encoding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Base64url = C_enc.Base64url = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a word array to a Base64url string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} wordArray The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {boolean} urlSafe Whether to use url safe\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The Base64url string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var base64String = CryptoJS.enc.Base64url.stringify(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (wordArray, urlSafe=true) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var words = wordArray.words;\n");
        sb.append("\t            var sigBytes = wordArray.sigBytes;\n");
        sb.append("\t            var map = urlSafe ? this._safe_map : this._map;\n");
        sb.append("\n");
        sb.append("\t            // Clamp excess bits\n");
        sb.append("\t            wordArray.clamp();\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            var base64Chars = [];\n");
        sb.append("\t            for (var i = 0; i < sigBytes; i += 3) {\n");
        sb.append("\t                var byte1 = (words[i >>> 2]       >>> (24 - (i % 4) * 8))       & 0xff;\n");
        sb.append("\t                var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n");
        sb.append("\t                var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n");
        sb.append("\n");
        sb.append("\t                var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n");
        sb.append("\n");
        sb.append("\t                for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n");
        sb.append("\t                    base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            var paddingChar = map.charAt(64);\n");
        sb.append("\t            if (paddingChar) {\n");
        sb.append("\t                while (base64Chars.length % 4) {\n");
        sb.append("\t                    base64Chars.push(paddingChar);\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return base64Chars.join('');\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a Base64url string to a word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} base64Str The Base64url string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {boolean} urlSafe Whether to use url safe\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The word array.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var wordArray = CryptoJS.enc.Base64url.parse(base64String);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (base64Str, urlSafe=true) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var base64StrLength = base64Str.length;\n");
        sb.append("\t            var map = urlSafe ? this._safe_map : this._map;\n");
        sb.append("\t            var reverseMap = this._reverseMap;\n");
        sb.append("\n");
        sb.append("\t            if (!reverseMap) {\n");
        sb.append("\t                reverseMap = this._reverseMap = [];\n");
        sb.append("\t                for (var j = 0; j < map.length; j++) {\n");
        sb.append("\t                    reverseMap[map.charCodeAt(j)] = j;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Ignore padding\n");
        sb.append("\t            var paddingChar = map.charAt(64);\n");
        sb.append("\t            if (paddingChar) {\n");
        sb.append("\t                var paddingIndex = base64Str.indexOf(paddingChar);\n");
        sb.append("\t                if (paddingIndex !== -1) {\n");
        sb.append("\t                    base64StrLength = paddingIndex;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Convert\n");
        sb.append("\t            return parseLoop(base64Str, base64StrLength, reverseMap);\n");
        sb.append("\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n");
        sb.append("\t        _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    function parseLoop(base64Str, base64StrLength, reverseMap) {\n");
        sb.append("\t        var words = [];\n");
        sb.append("\t        var nBytes = 0;\n");
        sb.append("\t        for (var i = 0; i < base64StrLength; i++) {\n");
        sb.append("\t            if (i % 4) {\n");
        sb.append("\t                var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n");
        sb.append("\t                var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n");
        sb.append("\t                var bitsCombined = bits1 | bits2;\n");
        sb.append("\t                words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n");
        sb.append("\t                nBytes++;\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t        return WordArray.create(words, nBytes);\n");
        sb.append("\t    }\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\t(function (Math) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Constants table\n");
        sb.append("\t    var T = [];\n");
        sb.append("\n");
        sb.append("\t    // Compute constants\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        for (var i = 0; i < 64; i++) {\n");
        sb.append("\t            T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * MD5 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var MD5 = C_algo.MD5 = Hasher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new WordArray.init([\n");
        sb.append("\t                0x67452301, 0xefcdab89,\n");
        sb.append("\t                0x98badcfe, 0x10325476\n");
        sb.append("\t            ]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Swap endian\n");
        sb.append("\t            for (var i = 0; i < 16; i++) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var offset_i = offset + i;\n");
        sb.append("\t                var M_offset_i = M[offset_i];\n");
        sb.append("\n");
        sb.append("\t                M[offset_i] = (\n");
        sb.append("\t                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var H = this._hash.words;\n");
        sb.append("\n");
        sb.append("\t            var M_offset_0  = M[offset + 0];\n");
        sb.append("\t            var M_offset_1  = M[offset + 1];\n");
        sb.append("\t            var M_offset_2  = M[offset + 2];\n");
        sb.append("\t            var M_offset_3  = M[offset + 3];\n");
        sb.append("\t            var M_offset_4  = M[offset + 4];\n");
        sb.append("\t            var M_offset_5  = M[offset + 5];\n");
        sb.append("\t            var M_offset_6  = M[offset + 6];\n");
        sb.append("\t            var M_offset_7  = M[offset + 7];\n");
        sb.append("\t            var M_offset_8  = M[offset + 8];\n");
        sb.append("\t            var M_offset_9  = M[offset + 9];\n");
        sb.append("\t            var M_offset_10 = M[offset + 10];\n");
        sb.append("\t            var M_offset_11 = M[offset + 11];\n");
        sb.append("\t            var M_offset_12 = M[offset + 12];\n");
        sb.append("\t            var M_offset_13 = M[offset + 13];\n");
        sb.append("\t            var M_offset_14 = M[offset + 14];\n");
        sb.append("\t            var M_offset_15 = M[offset + 15];\n");
        sb.append("\n");
        sb.append("\t            // Working varialbes\n");
        sb.append("\t            var a = H[0];\n");
        sb.append("\t            var b = H[1];\n");
        sb.append("\t            var c = H[2];\n");
        sb.append("\t            var d = H[3];\n");
        sb.append("\n");
        sb.append("\t            // Computation\n");
        sb.append("\t            a = FF(a, b, c, d, M_offset_0,  7,  T[0]);\n");
        sb.append("\t            d = FF(d, a, b, c, M_offset_1,  12, T[1]);\n");
        sb.append("\t            c = FF(c, d, a, b, M_offset_2,  17, T[2]);\n");
        sb.append("\t            b = FF(b, c, d, a, M_offset_3,  22, T[3]);\n");
        sb.append("\t            a = FF(a, b, c, d, M_offset_4,  7,  T[4]);\n");
        sb.append("\t            d = FF(d, a, b, c, M_offset_5,  12, T[5]);\n");
        sb.append("\t            c = FF(c, d, a, b, M_offset_6,  17, T[6]);\n");
        sb.append("\t            b = FF(b, c, d, a, M_offset_7,  22, T[7]);\n");
        sb.append("\t            a = FF(a, b, c, d, M_offset_8,  7,  T[8]);\n");
        sb.append("\t            d = FF(d, a, b, c, M_offset_9,  12, T[9]);\n");
        sb.append("\t            c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n");
        sb.append("\t            b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n");
        sb.append("\t            a = FF(a, b, c, d, M_offset_12, 7,  T[12]);\n");
        sb.append("\t            d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n");
        sb.append("\t            c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n");
        sb.append("\t            b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n");
        sb.append("\n");
        sb.append("\t            a = GG(a, b, c, d, M_offset_1,  5,  T[16]);\n");
        sb.append("\t            d = GG(d, a, b, c, M_offset_6,  9,  T[17]);\n");
        sb.append("\t            c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n");
        sb.append("\t            b = GG(b, c, d, a, M_offset_0,  20, T[19]);\n");
        sb.append("\t            a = GG(a, b, c, d, M_offset_5,  5,  T[20]);\n");
        sb.append("\t            d = GG(d, a, b, c, M_offset_10, 9,  T[21]);\n");
        sb.append("\t            c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n");
        sb.append("\t            b = GG(b, c, d, a, M_offset_4,  20, T[23]);\n");
        sb.append("\t            a = GG(a, b, c, d, M_offset_9,  5,  T[24]);\n");
        sb.append("\t            d = GG(d, a, b, c, M_offset_14, 9,  T[25]);\n");
        sb.append("\t            c = GG(c, d, a, b, M_offset_3,  14, T[26]);\n");
        sb.append("\t            b = GG(b, c, d, a, M_offset_8,  20, T[27]);\n");
        sb.append("\t            a = GG(a, b, c, d, M_offset_13, 5,  T[28]);\n");
        sb.append("\t            d = GG(d, a, b, c, M_offset_2,  9,  T[29]);\n");
        sb.append("\t            c = GG(c, d, a, b, M_offset_7,  14, T[30]);\n");
        sb.append("\t            b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n");
        sb.append("\n");
        sb.append("\t            a = HH(a, b, c, d, M_offset_5,  4,  T[32]);\n");
        sb.append("\t            d = HH(d, a, b, c, M_offset_8,  11, T[33]);\n");
        sb.append("\t            c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n");
        sb.append("\t            b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n");
        sb.append("\t            a = HH(a, b, c, d, M_offset_1,  4,  T[36]);\n");
        sb.append("\t            d = HH(d, a, b, c, M_offset_4,  11, T[37]);\n");
        sb.append("\t            c = HH(c, d, a, b, M_offset_7,  16, T[38]);\n");
        sb.append("\t            b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n");
        sb.append("\t            a = HH(a, b, c, d, M_offset_13, 4,  T[40]);\n");
        sb.append("\t            d = HH(d, a, b, c, M_offset_0,  11, T[41]);\n");
        sb.append("\t            c = HH(c, d, a, b, M_offset_3,  16, T[42]);\n");
        sb.append("\t            b = HH(b, c, d, a, M_offset_6,  23, T[43]);\n");
        sb.append("\t            a = HH(a, b, c, d, M_offset_9,  4,  T[44]);\n");
        sb.append("\t            d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n");
        sb.append("\t            c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n");
        sb.append("\t            b = HH(b, c, d, a, M_offset_2,  23, T[47]);\n");
        sb.append("\n");
        sb.append("\t            a = II(a, b, c, d, M_offset_0,  6,  T[48]);\n");
        sb.append("\t            d = II(d, a, b, c, M_offset_7,  10, T[49]);\n");
        sb.append("\t            c = II(c, d, a, b, M_offset_14, 15, T[50]);\n");
        sb.append("\t            b = II(b, c, d, a, M_offset_5,  21, T[51]);\n");
        sb.append("\t            a = II(a, b, c, d, M_offset_12, 6,  T[52]);\n");
        sb.append("\t            d = II(d, a, b, c, M_offset_3,  10, T[53]);\n");
        sb.append("\t            c = II(c, d, a, b, M_offset_10, 15, T[54]);\n");
        sb.append("\t            b = II(b, c, d, a, M_offset_1,  21, T[55]);\n");
        sb.append("\t            a = II(a, b, c, d, M_offset_8,  6,  T[56]);\n");
        sb.append("\t            d = II(d, a, b, c, M_offset_15, 10, T[57]);\n");
        sb.append("\t            c = II(c, d, a, b, M_offset_6,  15, T[58]);\n");
        sb.append("\t            b = II(b, c, d, a, M_offset_13, 21, T[59]);\n");
        sb.append("\t            a = II(a, b, c, d, M_offset_4,  6,  T[60]);\n");
        sb.append("\t            d = II(d, a, b, c, M_offset_11, 10, T[61]);\n");
        sb.append("\t            c = II(c, d, a, b, M_offset_2,  15, T[62]);\n");
        sb.append("\t            b = II(b, c, d, a, M_offset_9,  21, T[63]);\n");
        sb.append("\n");
        sb.append("\t            // Intermediate hash value\n");
        sb.append("\t            H[0] = (H[0] + a) | 0;\n");
        sb.append("\t            H[1] = (H[1] + b) | 0;\n");
        sb.append("\t            H[2] = (H[2] + c) | 0;\n");
        sb.append("\t            H[3] = (H[3] + d) | 0;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n");
        sb.append("\t            var nBitsTotalL = nBitsTotal;\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n");
        sb.append("\t                (((nBitsTotalH << 8)  | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                (((nBitsTotalH << 24) | (nBitsTotalH >>> 8))  & 0xff00ff00)\n");
        sb.append("\t            );\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n");
        sb.append("\t                (((nBitsTotalL << 8)  | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                (((nBitsTotalL << 24) | (nBitsTotalL >>> 8))  & 0xff00ff00)\n");
        sb.append("\t            );\n");
        sb.append("\n");
        sb.append("\t            data.sigBytes = (dataWords.length + 1) * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var hash = this._hash;\n");
        sb.append("\t            var H = hash.words;\n");
        sb.append("\n");
        sb.append("\t            // Swap endian\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                // Shortcut\n");
        sb.append("\t                var H_i = H[i];\n");
        sb.append("\n");
        sb.append("\t                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\t            clone._hash = this._hash.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    function FF(a, b, c, d, x, s, t) {\n");
        sb.append("\t        var n = a + ((b & c) | (~b & d)) + x + t;\n");
        sb.append("\t        return ((n << s) | (n >>> (32 - s))) + b;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function GG(a, b, c, d, x, s, t) {\n");
        sb.append("\t        var n = a + ((b & d) | (c & ~d)) + x + t;\n");
        sb.append("\t        return ((n << s) | (n >>> (32 - s))) + b;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function HH(a, b, c, d, x, s, t) {\n");
        sb.append("\t        var n = a + (b ^ c ^ d) + x + t;\n");
        sb.append("\t        return ((n << s) | (n >>> (32 - s))) + b;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function II(a, b, c, d, x, s, t) {\n");
        sb.append("\t        var n = a + (c ^ (b | ~d)) + x + t;\n");
        sb.append("\t        return ((n << s) | (n >>> (32 - s))) + b;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.MD5('message');\n");
        sb.append("\t     *     var hash = CryptoJS.MD5(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.MD5 = Hasher._createHelper(MD5);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacMD5(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacMD5 = Hasher._createHmacHelper(MD5);\n");
        sb.append("\t}(Math));\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Reusable object\n");
        sb.append("\t    var W = [];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-1 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA1 = C_algo.SHA1 = Hasher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new WordArray.init([\n");
        sb.append("\t                0x67452301, 0xefcdab89,\n");
        sb.append("\t                0x98badcfe, 0x10325476,\n");
        sb.append("\t                0xc3d2e1f0\n");
        sb.append("\t            ]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var H = this._hash.words;\n");
        sb.append("\n");
        sb.append("\t            // Working variables\n");
        sb.append("\t            var a = H[0];\n");
        sb.append("\t            var b = H[1];\n");
        sb.append("\t            var c = H[2];\n");
        sb.append("\t            var d = H[3];\n");
        sb.append("\t            var e = H[4];\n");
        sb.append("\n");
        sb.append("\t            // Computation\n");
        sb.append("\t            for (var i = 0; i < 80; i++) {\n");
        sb.append("\t                if (i < 16) {\n");
        sb.append("\t                    W[i] = M[offset + i] | 0;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n");
        sb.append("\t                    W[i] = (n << 1) | (n >>> 31);\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                var t = ((a << 5) | (a >>> 27)) + e + W[i];\n");
        sb.append("\t                if (i < 20) {\n");
        sb.append("\t                    t += ((b & c) | (~b & d)) + 0x5a827999;\n");
        sb.append("\t                } else if (i < 40) {\n");
        sb.append("\t                    t += (b ^ c ^ d) + 0x6ed9eba1;\n");
        sb.append("\t                } else if (i < 60) {\n");
        sb.append("\t                    t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n");
        sb.append("\t                } else /* if (i < 80) */ {\n");
        sb.append("\t                    t += (b ^ c ^ d) - 0x359d3e2a;\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                e = d;\n");
        sb.append("\t                d = c;\n");
        sb.append("\t                c = (b << 30) | (b >>> 2);\n");
        sb.append("\t                b = a;\n");
        sb.append("\t                a = t;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Intermediate hash value\n");
        sb.append("\t            H[0] = (H[0] + a) | 0;\n");
        sb.append("\t            H[1] = (H[1] + b) | 0;\n");
        sb.append("\t            H[2] = (H[2] + c) | 0;\n");
        sb.append("\t            H[3] = (H[3] + d) | 0;\n");
        sb.append("\t            H[4] = (H[4] + e) | 0;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n");
        sb.append("\t            data.sigBytes = dataWords.length * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return this._hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\t            clone._hash = this._hash.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA1('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA1(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA1 = Hasher._createHelper(SHA1);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA1(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function (Math) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Initialization and round constants tables\n");
        sb.append("\t    var H = [];\n");
        sb.append("\t    var K = [];\n");
        sb.append("\n");
        sb.append("\t    // Compute constants\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        function isPrime(n) {\n");
        sb.append("\t            var sqrtN = Math.sqrt(n);\n");
        sb.append("\t            for (var factor = 2; factor <= sqrtN; factor++) {\n");
        sb.append("\t                if (!(n % factor)) {\n");
        sb.append("\t                    return false;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return true;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        function getFractionalBits(n) {\n");
        sb.append("\t            return ((n - (n | 0)) * 0x100000000) | 0;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        var n = 2;\n");
        sb.append("\t        var nPrime = 0;\n");
        sb.append("\t        while (nPrime < 64) {\n");
        sb.append("\t            if (isPrime(n)) {\n");
        sb.append("\t                if (nPrime < 8) {\n");
        sb.append("\t                    H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n");
        sb.append("\t                }\n");
        sb.append("\t                K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n");
        sb.append("\n");
        sb.append("\t                nPrime++;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            n++;\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    // Reusable object\n");
        sb.append("\t    var W = [];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-256 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA256 = C_algo.SHA256 = Hasher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new WordArray.init(H.slice(0));\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var H = this._hash.words;\n");
        sb.append("\n");
        sb.append("\t            // Working variables\n");
        sb.append("\t            var a = H[0];\n");
        sb.append("\t            var b = H[1];\n");
        sb.append("\t            var c = H[2];\n");
        sb.append("\t            var d = H[3];\n");
        sb.append("\t            var e = H[4];\n");
        sb.append("\t            var f = H[5];\n");
        sb.append("\t            var g = H[6];\n");
        sb.append("\t            var h = H[7];\n");
        sb.append("\n");
        sb.append("\t            // Computation\n");
        sb.append("\t            for (var i = 0; i < 64; i++) {\n");
        sb.append("\t                if (i < 16) {\n");
        sb.append("\t                    W[i] = M[offset + i] | 0;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    var gamma0x = W[i - 15];\n");
        sb.append("\t                    var gamma0  = ((gamma0x << 25) | (gamma0x >>> 7))  ^\n");
        sb.append("\t                                  ((gamma0x << 14) | (gamma0x >>> 18)) ^\n");
        sb.append("\t                                   (gamma0x >>> 3);\n");
        sb.append("\n");
        sb.append("\t                    var gamma1x = W[i - 2];\n");
        sb.append("\t                    var gamma1  = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n");
        sb.append("\t                                  ((gamma1x << 13) | (gamma1x >>> 19)) ^\n");
        sb.append("\t                                   (gamma1x >>> 10);\n");
        sb.append("\n");
        sb.append("\t                    W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                var ch  = (e & f) ^ (~e & g);\n");
        sb.append("\t                var maj = (a & b) ^ (a & c) ^ (b & c);\n");
        sb.append("\n");
        sb.append("\t                var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n");
        sb.append("\t                var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7)  | (e >>> 25));\n");
        sb.append("\n");
        sb.append("\t                var t1 = h + sigma1 + ch + K[i] + W[i];\n");
        sb.append("\t                var t2 = sigma0 + maj;\n");
        sb.append("\n");
        sb.append("\t                h = g;\n");
        sb.append("\t                g = f;\n");
        sb.append("\t                f = e;\n");
        sb.append("\t                e = (d + t1) | 0;\n");
        sb.append("\t                d = c;\n");
        sb.append("\t                c = b;\n");
        sb.append("\t                b = a;\n");
        sb.append("\t                a = (t1 + t2) | 0;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Intermediate hash value\n");
        sb.append("\t            H[0] = (H[0] + a) | 0;\n");
        sb.append("\t            H[1] = (H[1] + b) | 0;\n");
        sb.append("\t            H[2] = (H[2] + c) | 0;\n");
        sb.append("\t            H[3] = (H[3] + d) | 0;\n");
        sb.append("\t            H[4] = (H[4] + e) | 0;\n");
        sb.append("\t            H[5] = (H[5] + f) | 0;\n");
        sb.append("\t            H[6] = (H[6] + g) | 0;\n");
        sb.append("\t            H[7] = (H[7] + h) | 0;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n");
        sb.append("\t            data.sigBytes = dataWords.length * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return this._hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\t            clone._hash = this._hash.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA256('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA256(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA256 = Hasher._createHelper(SHA256);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA256(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n");
        sb.append("\t}(Math));\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\t    var SHA256 = C_algo.SHA256;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-224 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA224 = C_algo.SHA224 = SHA256.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new WordArray.init([\n");
        sb.append("\t                0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n");
        sb.append("\t                0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n");
        sb.append("\t            ]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            var hash = SHA256._doFinalize.call(this);\n");
        sb.append("\n");
        sb.append("\t            hash.sigBytes -= 4;\n");
        sb.append("\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA224('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA224(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA224 = SHA256._createHelper(SHA224);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA224(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_x64 = C.x64;\n");
        sb.append("\t    var X64Word = C_x64.Word;\n");
        sb.append("\t    var X64WordArray = C_x64.WordArray;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    function X64Word_create() {\n");
        sb.append("\t        return X64Word.create.apply(X64Word, arguments);\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    // Constants\n");
        sb.append("\t    var K = [\n");
        sb.append("\t        X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n");
        sb.append("\t        X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n");
        sb.append("\t        X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n");
        sb.append("\t        X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n");
        sb.append("\t        X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n");
        sb.append("\t        X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n");
        sb.append("\t        X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n");
        sb.append("\t        X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n");
        sb.append("\t        X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n");
        sb.append("\t        X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n");
        sb.append("\t        X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n");
        sb.append("\t        X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n");
        sb.append("\t        X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n");
        sb.append("\t        X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n");
        sb.append("\t        X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n");
        sb.append("\t        X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n");
        sb.append("\t        X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n");
        sb.append("\t        X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n");
        sb.append("\t        X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n");
        sb.append("\t        X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n");
        sb.append("\t        X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n");
        sb.append("\t        X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n");
        sb.append("\t        X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n");
        sb.append("\t        X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n");
        sb.append("\t        X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n");
        sb.append("\t        X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n");
        sb.append("\t        X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n");
        sb.append("\t        X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n");
        sb.append("\t        X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n");
        sb.append("\t        X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n");
        sb.append("\t        X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n");
        sb.append("\t        X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n");
        sb.append("\t        X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n");
        sb.append("\t        X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n");
        sb.append("\t        X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n");
        sb.append("\t        X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n");
        sb.append("\t        X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n");
        sb.append("\t        X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n");
        sb.append("\t        X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n");
        sb.append("\t        X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n");
        sb.append("\t    ];\n");
        sb.append("\n");
        sb.append("\t    // Reusable objects\n");
        sb.append("\t    var W = [];\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        for (var i = 0; i < 80; i++) {\n");
        sb.append("\t            W[i] = X64Word_create();\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-512 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA512 = C_algo.SHA512 = Hasher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new X64WordArray.init([\n");
        sb.append("\t                new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n");
        sb.append("\t                new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n");
        sb.append("\t                new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n");
        sb.append("\t                new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n");
        sb.append("\t            ]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var H = this._hash.words;\n");
        sb.append("\n");
        sb.append("\t            var H0 = H[0];\n");
        sb.append("\t            var H1 = H[1];\n");
        sb.append("\t            var H2 = H[2];\n");
        sb.append("\t            var H3 = H[3];\n");
        sb.append("\t            var H4 = H[4];\n");
        sb.append("\t            var H5 = H[5];\n");
        sb.append("\t            var H6 = H[6];\n");
        sb.append("\t            var H7 = H[7];\n");
        sb.append("\n");
        sb.append("\t            var H0h = H0.high;\n");
        sb.append("\t            var H0l = H0.low;\n");
        sb.append("\t            var H1h = H1.high;\n");
        sb.append("\t            var H1l = H1.low;\n");
        sb.append("\t            var H2h = H2.high;\n");
        sb.append("\t            var H2l = H2.low;\n");
        sb.append("\t            var H3h = H3.high;\n");
        sb.append("\t            var H3l = H3.low;\n");
        sb.append("\t            var H4h = H4.high;\n");
        sb.append("\t            var H4l = H4.low;\n");
        sb.append("\t            var H5h = H5.high;\n");
        sb.append("\t            var H5l = H5.low;\n");
        sb.append("\t            var H6h = H6.high;\n");
        sb.append("\t            var H6l = H6.low;\n");
        sb.append("\t            var H7h = H7.high;\n");
        sb.append("\t            var H7l = H7.low;\n");
        sb.append("\n");
        sb.append("\t            // Working variables\n");
        sb.append("\t            var ah = H0h;\n");
        sb.append("\t            var al = H0l;\n");
        sb.append("\t            var bh = H1h;\n");
        sb.append("\t            var bl = H1l;\n");
        sb.append("\t            var ch = H2h;\n");
        sb.append("\t            var cl = H2l;\n");
        sb.append("\t            var dh = H3h;\n");
        sb.append("\t            var dl = H3l;\n");
        sb.append("\t            var eh = H4h;\n");
        sb.append("\t            var el = H4l;\n");
        sb.append("\t            var fh = H5h;\n");
        sb.append("\t            var fl = H5l;\n");
        sb.append("\t            var gh = H6h;\n");
        sb.append("\t            var gl = H6l;\n");
        sb.append("\t            var hh = H7h;\n");
        sb.append("\t            var hl = H7l;\n");
        sb.append("\n");
        sb.append("\t            // Rounds\n");
        sb.append("\t            for (var i = 0; i < 80; i++) {\n");
        sb.append("\t                var Wil;\n");
        sb.append("\t                var Wih;\n");
        sb.append("\n");
        sb.append("\t                // Shortcut\n");
        sb.append("\t                var Wi = W[i];\n");
        sb.append("\n");
        sb.append("\t                // Extend message\n");
        sb.append("\t                if (i < 16) {\n");
        sb.append("\t                    Wih = Wi.high = M[offset + i * 2]     | 0;\n");
        sb.append("\t                    Wil = Wi.low  = M[offset + i * 2 + 1] | 0;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    // Gamma0\n");
        sb.append("\t                    var gamma0x  = W[i - 15];\n");
        sb.append("\t                    var gamma0xh = gamma0x.high;\n");
        sb.append("\t                    var gamma0xl = gamma0x.low;\n");
        sb.append("\t                    var gamma0h  = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n");
        sb.append("\t                    var gamma0l  = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n");
        sb.append("\n");
        sb.append("\t                    // Gamma1\n");
        sb.append("\t                    var gamma1x  = W[i - 2];\n");
        sb.append("\t                    var gamma1xh = gamma1x.high;\n");
        sb.append("\t                    var gamma1xl = gamma1x.low;\n");
        sb.append("\t                    var gamma1h  = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n");
        sb.append("\t                    var gamma1l  = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n");
        sb.append("\n");
        sb.append("\t                    // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n");
        sb.append("\t                    var Wi7  = W[i - 7];\n");
        sb.append("\t                    var Wi7h = Wi7.high;\n");
        sb.append("\t                    var Wi7l = Wi7.low;\n");
        sb.append("\n");
        sb.append("\t                    var Wi16  = W[i - 16];\n");
        sb.append("\t                    var Wi16h = Wi16.high;\n");
        sb.append("\t                    var Wi16l = Wi16.low;\n");
        sb.append("\n");
        sb.append("\t                    Wil = gamma0l + Wi7l;\n");
        sb.append("\t                    Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n");
        sb.append("\t                    Wil = Wil + gamma1l;\n");
        sb.append("\t                    Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n");
        sb.append("\t                    Wil = Wil + Wi16l;\n");
        sb.append("\t                    Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n");
        sb.append("\n");
        sb.append("\t                    Wi.high = Wih;\n");
        sb.append("\t                    Wi.low  = Wil;\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                var chh  = (eh & fh) ^ (~eh & gh);\n");
        sb.append("\t                var chl  = (el & fl) ^ (~el & gl);\n");
        sb.append("\t                var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n");
        sb.append("\t                var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n");
        sb.append("\n");
        sb.append("\t                var sigma0h = ((ah >>> 28) | (al << 4))  ^ ((ah << 30)  | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n");
        sb.append("\t                var sigma0l = ((al >>> 28) | (ah << 4))  ^ ((al << 30)  | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n");
        sb.append("\t                var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n");
        sb.append("\t                var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n");
        sb.append("\n");
        sb.append("\t                // t1 = h + sigma1 + ch + K[i] + W[i]\n");
        sb.append("\t                var Ki  = K[i];\n");
        sb.append("\t                var Kih = Ki.high;\n");
        sb.append("\t                var Kil = Ki.low;\n");
        sb.append("\n");
        sb.append("\t                var t1l = hl + sigma1l;\n");
        sb.append("\t                var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n");
        sb.append("\t                var t1l = t1l + chl;\n");
        sb.append("\t                var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n");
        sb.append("\t                var t1l = t1l + Kil;\n");
        sb.append("\t                var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n");
        sb.append("\t                var t1l = t1l + Wil;\n");
        sb.append("\t                var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n");
        sb.append("\n");
        sb.append("\t                // t2 = sigma0 + maj\n");
        sb.append("\t                var t2l = sigma0l + majl;\n");
        sb.append("\t                var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n");
        sb.append("\n");
        sb.append("\t                // Update working variables\n");
        sb.append("\t                hh = gh;\n");
        sb.append("\t                hl = gl;\n");
        sb.append("\t                gh = fh;\n");
        sb.append("\t                gl = fl;\n");
        sb.append("\t                fh = eh;\n");
        sb.append("\t                fl = el;\n");
        sb.append("\t                el = (dl + t1l) | 0;\n");
        sb.append("\t                eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t                dh = ch;\n");
        sb.append("\t                dl = cl;\n");
        sb.append("\t                ch = bh;\n");
        sb.append("\t                cl = bl;\n");
        sb.append("\t                bh = ah;\n");
        sb.append("\t                bl = al;\n");
        sb.append("\t                al = (t1l + t2l) | 0;\n");
        sb.append("\t                ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Intermediate hash value\n");
        sb.append("\t            H0l = H0.low  = (H0l + al);\n");
        sb.append("\t            H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n");
        sb.append("\t            H1l = H1.low  = (H1l + bl);\n");
        sb.append("\t            H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n");
        sb.append("\t            H2l = H2.low  = (H2l + cl);\n");
        sb.append("\t            H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n");
        sb.append("\t            H3l = H3.low  = (H3l + dl);\n");
        sb.append("\t            H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n");
        sb.append("\t            H4l = H4.low  = (H4l + el);\n");
        sb.append("\t            H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n");
        sb.append("\t            H5l = H5.low  = (H5l + fl);\n");
        sb.append("\t            H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n");
        sb.append("\t            H6l = H6.low  = (H6l + gl);\n");
        sb.append("\t            H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n");
        sb.append("\t            H7l = H7.low  = (H7l + hl);\n");
        sb.append("\t            H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n");
        sb.append("\t            data.sigBytes = dataWords.length * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Convert hash to 32-bit word array before returning\n");
        sb.append("\t            var hash = this._hash.toX32();\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\t            clone._hash = this._hash.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 1024/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA512('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA512(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA512 = Hasher._createHelper(SHA512);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA512(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_x64 = C.x64;\n");
        sb.append("\t    var X64Word = C_x64.Word;\n");
        sb.append("\t    var X64WordArray = C_x64.WordArray;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\t    var SHA512 = C_algo.SHA512;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-384 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA384 = C_algo.SHA384 = SHA512.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash = new X64WordArray.init([\n");
        sb.append("\t                new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n");
        sb.append("\t                new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n");
        sb.append("\t                new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n");
        sb.append("\t                new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n");
        sb.append("\t            ]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            var hash = SHA512._doFinalize.call(this);\n");
        sb.append("\n");
        sb.append("\t            hash.sigBytes -= 16;\n");
        sb.append("\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA384('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA384(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA384 = SHA512._createHelper(SHA384);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA384(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function (Math) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_x64 = C.x64;\n");
        sb.append("\t    var X64Word = C_x64.Word;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Constants tables\n");
        sb.append("\t    var RHO_OFFSETS = [];\n");
        sb.append("\t    var PI_INDEXES  = [];\n");
        sb.append("\t    var ROUND_CONSTANTS = [];\n");
        sb.append("\n");
        sb.append("\t    // Compute Constants\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        // Compute rho offset constants\n");
        sb.append("\t        var x = 1, y = 0;\n");
        sb.append("\t        for (var t = 0; t < 24; t++) {\n");
        sb.append("\t            RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n");
        sb.append("\n");
        sb.append("\t            var newX = y % 5;\n");
        sb.append("\t            var newY = (2 * x + 3 * y) % 5;\n");
        sb.append("\t            x = newX;\n");
        sb.append("\t            y = newY;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Compute pi index constants\n");
        sb.append("\t        for (var x = 0; x < 5; x++) {\n");
        sb.append("\t            for (var y = 0; y < 5; y++) {\n");
        sb.append("\t                PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Compute round constants\n");
        sb.append("\t        var LFSR = 0x01;\n");
        sb.append("\t        for (var i = 0; i < 24; i++) {\n");
        sb.append("\t            var roundConstantMsw = 0;\n");
        sb.append("\t            var roundConstantLsw = 0;\n");
        sb.append("\n");
        sb.append("\t            for (var j = 0; j < 7; j++) {\n");
        sb.append("\t                if (LFSR & 0x01) {\n");
        sb.append("\t                    var bitPosition = (1 << j) - 1;\n");
        sb.append("\t                    if (bitPosition < 32) {\n");
        sb.append("\t                        roundConstantLsw ^= 1 << bitPosition;\n");
        sb.append("\t                    } else /* if (bitPosition >= 32) */ {\n");
        sb.append("\t                        roundConstantMsw ^= 1 << (bitPosition - 32);\n");
        sb.append("\t                    }\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Compute next LFSR\n");
        sb.append("\t                if (LFSR & 0x80) {\n");
        sb.append("\t                    // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n");
        sb.append("\t                    LFSR = (LFSR << 1) ^ 0x71;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    LFSR <<= 1;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    // Reusable objects for temporary values\n");
        sb.append("\t    var T = [];\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        for (var i = 0; i < 25; i++) {\n");
        sb.append("\t            T[i] = X64Word.create();\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * SHA-3 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SHA3 = C_algo.SHA3 = Hasher.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {number} outputLength\n");
        sb.append("\t         *   The desired number of bits in the output hash.\n");
        sb.append("\t         *   Only values permitted are: 224, 256, 384, 512.\n");
        sb.append("\t         *   Default: 512\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Hasher.cfg.extend({\n");
        sb.append("\t            outputLength: 512\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            var state = this._state = []\n");
        sb.append("\t            for (var i = 0; i < 25; i++) {\n");
        sb.append("\t                state[i] = new X64Word.init();\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var state = this._state;\n");
        sb.append("\t            var nBlockSizeLanes = this.blockSize / 2;\n");
        sb.append("\n");
        sb.append("\t            // Absorb\n");
        sb.append("\t            for (var i = 0; i < nBlockSizeLanes; i++) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var M2i  = M[offset + 2 * i];\n");
        sb.append("\t                var M2i1 = M[offset + 2 * i + 1];\n");
        sb.append("\n");
        sb.append("\t                // Swap endian\n");
        sb.append("\t                M2i = (\n");
        sb.append("\t                    (((M2i << 8)  | (M2i >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((M2i << 24) | (M2i >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\t                M2i1 = (\n");
        sb.append("\t                    (((M2i1 << 8)  | (M2i1 >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((M2i1 << 24) | (M2i1 >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\n");
        sb.append("\t                // Absorb message into state\n");
        sb.append("\t                var lane = state[i];\n");
        sb.append("\t                lane.high ^= M2i1;\n");
        sb.append("\t                lane.low  ^= M2i;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Rounds\n");
        sb.append("\t            for (var round = 0; round < 24; round++) {\n");
        sb.append("\t                // Theta\n");
        sb.append("\t                for (var x = 0; x < 5; x++) {\n");
        sb.append("\t                    // Mix column lanes\n");
        sb.append("\t                    var tMsw = 0, tLsw = 0;\n");
        sb.append("\t                    for (var y = 0; y < 5; y++) {\n");
        sb.append("\t                        var lane = state[x + 5 * y];\n");
        sb.append("\t                        tMsw ^= lane.high;\n");
        sb.append("\t                        tLsw ^= lane.low;\n");
        sb.append("\t                    }\n");
        sb.append("\n");
        sb.append("\t                    // Temporary values\n");
        sb.append("\t                    var Tx = T[x];\n");
        sb.append("\t                    Tx.high = tMsw;\n");
        sb.append("\t                    Tx.low  = tLsw;\n");
        sb.append("\t                }\n");
        sb.append("\t                for (var x = 0; x < 5; x++) {\n");
        sb.append("\t                    // Shortcuts\n");
        sb.append("\t                    var Tx4 = T[(x + 4) % 5];\n");
        sb.append("\t                    var Tx1 = T[(x + 1) % 5];\n");
        sb.append("\t                    var Tx1Msw = Tx1.high;\n");
        sb.append("\t                    var Tx1Lsw = Tx1.low;\n");
        sb.append("\n");
        sb.append("\t                    // Mix surrounding columns\n");
        sb.append("\t                    var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n");
        sb.append("\t                    var tLsw = Tx4.low  ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n");
        sb.append("\t                    for (var y = 0; y < 5; y++) {\n");
        sb.append("\t                        var lane = state[x + 5 * y];\n");
        sb.append("\t                        lane.high ^= tMsw;\n");
        sb.append("\t                        lane.low  ^= tLsw;\n");
        sb.append("\t                    }\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Rho Pi\n");
        sb.append("\t                for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n");
        sb.append("\t                    var tMsw;\n");
        sb.append("\t                    var tLsw;\n");
        sb.append("\n");
        sb.append("\t                    // Shortcuts\n");
        sb.append("\t                    var lane = state[laneIndex];\n");
        sb.append("\t                    var laneMsw = lane.high;\n");
        sb.append("\t                    var laneLsw = lane.low;\n");
        sb.append("\t                    var rhoOffset = RHO_OFFSETS[laneIndex];\n");
        sb.append("\n");
        sb.append("\t                    // Rotate lanes\n");
        sb.append("\t                    if (rhoOffset < 32) {\n");
        sb.append("\t                        tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n");
        sb.append("\t                        tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n");
        sb.append("\t                    } else /* if (rhoOffset >= 32) */ {\n");
        sb.append("\t                        tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n");
        sb.append("\t                        tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n");
        sb.append("\t                    }\n");
        sb.append("\n");
        sb.append("\t                    // Transpose lanes\n");
        sb.append("\t                    var TPiLane = T[PI_INDEXES[laneIndex]];\n");
        sb.append("\t                    TPiLane.high = tMsw;\n");
        sb.append("\t                    TPiLane.low  = tLsw;\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Rho pi at x = y = 0\n");
        sb.append("\t                var T0 = T[0];\n");
        sb.append("\t                var state0 = state[0];\n");
        sb.append("\t                T0.high = state0.high;\n");
        sb.append("\t                T0.low  = state0.low;\n");
        sb.append("\n");
        sb.append("\t                // Chi\n");
        sb.append("\t                for (var x = 0; x < 5; x++) {\n");
        sb.append("\t                    for (var y = 0; y < 5; y++) {\n");
        sb.append("\t                        // Shortcuts\n");
        sb.append("\t                        var laneIndex = x + 5 * y;\n");
        sb.append("\t                        var lane = state[laneIndex];\n");
        sb.append("\t                        var TLane = T[laneIndex];\n");
        sb.append("\t                        var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n");
        sb.append("\t                        var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n");
        sb.append("\n");
        sb.append("\t                        // Mix rows\n");
        sb.append("\t                        lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n");
        sb.append("\t                        lane.low  = TLane.low  ^ (~Tx1Lane.low  & Tx2Lane.low);\n");
        sb.append("\t                    }\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Iota\n");
        sb.append("\t                var lane = state[0];\n");
        sb.append("\t                var roundConstant = ROUND_CONSTANTS[round];\n");
        sb.append("\t                lane.high ^= roundConstant.high;\n");
        sb.append("\t                lane.low  ^= roundConstant.low;\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\t            var blockSizeBits = this.blockSize * 32;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n");
        sb.append("\t            dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n");
        sb.append("\t            data.sigBytes = dataWords.length * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var state = this._state;\n");
        sb.append("\t            var outputLengthBytes = this.cfg.outputLength / 8;\n");
        sb.append("\t            var outputLengthLanes = outputLengthBytes / 8;\n");
        sb.append("\n");
        sb.append("\t            // Squeeze\n");
        sb.append("\t            var hashWords = [];\n");
        sb.append("\t            for (var i = 0; i < outputLengthLanes; i++) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var lane = state[i];\n");
        sb.append("\t                var laneMsw = lane.high;\n");
        sb.append("\t                var laneLsw = lane.low;\n");
        sb.append("\n");
        sb.append("\t                // Swap endian\n");
        sb.append("\t                laneMsw = (\n");
        sb.append("\t                    (((laneMsw << 8)  | (laneMsw >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((laneMsw << 24) | (laneMsw >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\t                laneLsw = (\n");
        sb.append("\t                    (((laneLsw << 8)  | (laneLsw >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((laneLsw << 24) | (laneLsw >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\n");
        sb.append("\t                // Squeeze state to retrieve hash\n");
        sb.append("\t                hashWords.push(laneLsw);\n");
        sb.append("\t                hashWords.push(laneMsw);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return new WordArray.init(hashWords, outputLengthBytes);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\n");
        sb.append("\t            var state = clone._state = this._state.slice(0);\n");
        sb.append("\t            for (var i = 0; i < 25; i++) {\n");
        sb.append("\t                state[i] = state[i].clone();\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.SHA3('message');\n");
        sb.append("\t     *     var hash = CryptoJS.SHA3(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.SHA3 = Hasher._createHelper(SHA3);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacSHA3(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n");
        sb.append("\t}(Math));\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/** @preserve\n");
        sb.append("\t(c) 2012 by Cédric Mesnil. All rights reserved.\n");
        sb.append("\n");
        sb.append("\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n");
        sb.append("\n");
        sb.append("\t    - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n");
        sb.append("\t    - 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.\n");
        sb.append("\n");
        sb.append("\tTHIS 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.\n");
        sb.append("\t*/\n");
        sb.append("\n");
        sb.append("\t(function (Math) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var Hasher = C_lib.Hasher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Constants table\n");
        sb.append("\t    var _zl = WordArray.create([\n");
        sb.append("\t        0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,\n");
        sb.append("\t        7,  4, 13,  1, 10,  6, 15,  3, 12,  0,  9,  5,  2, 14, 11,  8,\n");
        sb.append("\t        3, 10, 14,  4,  9, 15,  8,  1,  2,  7,  0,  6, 13, 11,  5, 12,\n");
        sb.append("\t        1,  9, 11, 10,  0,  8, 12,  4, 13,  3,  7, 15, 14,  5,  6,  2,\n");
        sb.append("\t        4,  0,  5,  9,  7, 12,  2, 10, 14,  1,  3,  8, 11,  6, 15, 13]);\n");
        sb.append("\t    var _zr = WordArray.create([\n");
        sb.append("\t        5, 14,  7,  0,  9,  2, 11,  4, 13,  6, 15,  8,  1, 10,  3, 12,\n");
        sb.append("\t        6, 11,  3,  7,  0, 13,  5, 10, 14, 15,  8, 12,  4,  9,  1,  2,\n");
        sb.append("\t        15,  5,  1,  3,  7, 14,  6,  9, 11,  8, 12,  2, 10,  0,  4, 13,\n");
        sb.append("\t        8,  6,  4,  1,  3, 11, 15,  0,  5, 12,  2, 13,  9,  7, 10, 14,\n");
        sb.append("\t        12, 15, 10,  4,  1,  5,  8,  7,  6,  2, 13, 14,  0,  3,  9, 11]);\n");
        sb.append("\t    var _sl = WordArray.create([\n");
        sb.append("\t         11, 14, 15, 12,  5,  8,  7,  9, 11, 13, 14, 15,  6,  7,  9,  8,\n");
        sb.append("\t        7, 6,   8, 13, 11,  9,  7, 15,  7, 12, 15,  9, 11,  7, 13, 12,\n");
        sb.append("\t        11, 13,  6,  7, 14,  9, 13, 15, 14,  8, 13,  6,  5, 12,  7,  5,\n");
        sb.append("\t          11, 12, 14, 15, 14, 15,  9,  8,  9, 14,  5,  6,  8,  6,  5, 12,\n");
        sb.append("\t        9, 15,  5, 11,  6,  8, 13, 12,  5, 12, 13, 14, 11,  8,  5,  6 ]);\n");
        sb.append("\t    var _sr = WordArray.create([\n");
        sb.append("\t        8,  9,  9, 11, 13, 15, 15,  5,  7,  7,  8, 11, 14, 14, 12,  6,\n");
        sb.append("\t        9, 13, 15,  7, 12,  8,  9, 11,  7,  7, 12,  7,  6, 15, 13, 11,\n");
        sb.append("\t        9,  7, 15, 11,  8,  6,  6, 14, 12, 13,  5, 14, 13, 13,  7,  5,\n");
        sb.append("\t        15,  5,  8, 11, 14, 14,  6, 14,  6,  9, 12,  9, 12,  5, 15,  8,\n");
        sb.append("\t        8,  5, 12,  9, 12,  5, 14,  6,  8, 13,  6,  5, 15, 13, 11, 11 ]);\n");
        sb.append("\n");
        sb.append("\t    var _hl =  WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n");
        sb.append("\t    var _hr =  WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * RIPEMD160 hash algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            this._hash  = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\n");
        sb.append("\t            // Swap endian\n");
        sb.append("\t            for (var i = 0; i < 16; i++) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var offset_i = offset + i;\n");
        sb.append("\t                var M_offset_i = M[offset_i];\n");
        sb.append("\n");
        sb.append("\t                // Swap\n");
        sb.append("\t                M[offset_i] = (\n");
        sb.append("\t                    (((M_offset_i << 8)  | (M_offset_i >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                    (((M_offset_i << 24) | (M_offset_i >>> 8))  & 0xff00ff00)\n");
        sb.append("\t                );\n");
        sb.append("\t            }\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var H  = this._hash.words;\n");
        sb.append("\t            var hl = _hl.words;\n");
        sb.append("\t            var hr = _hr.words;\n");
        sb.append("\t            var zl = _zl.words;\n");
        sb.append("\t            var zr = _zr.words;\n");
        sb.append("\t            var sl = _sl.words;\n");
        sb.append("\t            var sr = _sr.words;\n");
        sb.append("\n");
        sb.append("\t            // Working variables\n");
        sb.append("\t            var al, bl, cl, dl, el;\n");
        sb.append("\t            var ar, br, cr, dr, er;\n");
        sb.append("\n");
        sb.append("\t            ar = al = H[0];\n");
        sb.append("\t            br = bl = H[1];\n");
        sb.append("\t            cr = cl = H[2];\n");
        sb.append("\t            dr = dl = H[3];\n");
        sb.append("\t            er = el = H[4];\n");
        sb.append("\t            // Computation\n");
        sb.append("\t            var t;\n");
        sb.append("\t            for (var i = 0; i < 80; i += 1) {\n");
        sb.append("\t                t = (al +  M[offset+zl[i]])|0;\n");
        sb.append("\t                if (i<16){\n");
        sb.append("\t\t            t +=  f1(bl,cl,dl) + hl[0];\n");
        sb.append("\t                } else if (i<32) {\n");
        sb.append("\t\t            t +=  f2(bl,cl,dl) + hl[1];\n");
        sb.append("\t                } else if (i<48) {\n");
        sb.append("\t\t            t +=  f3(bl,cl,dl) + hl[2];\n");
        sb.append("\t                } else if (i<64) {\n");
        sb.append("\t\t            t +=  f4(bl,cl,dl) + hl[3];\n");
        sb.append("\t                } else {// if (i<80) {\n");
        sb.append("\t\t            t +=  f5(bl,cl,dl) + hl[4];\n");
        sb.append("\t                }\n");
        sb.append("\t                t = t|0;\n");
        sb.append("\t                t =  rotl(t,sl[i]);\n");
        sb.append("\t                t = (t+el)|0;\n");
        sb.append("\t                al = el;\n");
        sb.append("\t                el = dl;\n");
        sb.append("\t                dl = rotl(cl, 10);\n");
        sb.append("\t                cl = bl;\n");
        sb.append("\t                bl = t;\n");
        sb.append("\n");
        sb.append("\t                t = (ar + M[offset+zr[i]])|0;\n");
        sb.append("\t                if (i<16){\n");
        sb.append("\t\t            t +=  f5(br,cr,dr) + hr[0];\n");
        sb.append("\t                } else if (i<32) {\n");
        sb.append("\t\t            t +=  f4(br,cr,dr) + hr[1];\n");
        sb.append("\t                } else if (i<48) {\n");
        sb.append("\t\t            t +=  f3(br,cr,dr) + hr[2];\n");
        sb.append("\t                } else if (i<64) {\n");
        sb.append("\t\t            t +=  f2(br,cr,dr) + hr[3];\n");
        sb.append("\t                } else {// if (i<80) {\n");
        sb.append("\t\t            t +=  f1(br,cr,dr) + hr[4];\n");
        sb.append("\t                }\n");
        sb.append("\t                t = t|0;\n");
        sb.append("\t                t =  rotl(t,sr[i]) ;\n");
        sb.append("\t                t = (t+er)|0;\n");
        sb.append("\t                ar = er;\n");
        sb.append("\t                er = dr;\n");
        sb.append("\t                dr = rotl(cr, 10);\n");
        sb.append("\t                cr = br;\n");
        sb.append("\t                br = t;\n");
        sb.append("\t            }\n");
        sb.append("\t            // Intermediate hash value\n");
        sb.append("\t            t    = (H[1] + cl + dr)|0;\n");
        sb.append("\t            H[1] = (H[2] + dl + er)|0;\n");
        sb.append("\t            H[2] = (H[3] + el + ar)|0;\n");
        sb.append("\t            H[3] = (H[4] + al + br)|0;\n");
        sb.append("\t            H[4] = (H[0] + bl + cr)|0;\n");
        sb.append("\t            H[0] =  t;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var data = this._data;\n");
        sb.append("\t            var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t            var nBitsTotal = this._nDataBytes * 8;\n");
        sb.append("\t            var nBitsLeft = data.sigBytes * 8;\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n");
        sb.append("\t            dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n");
        sb.append("\t                (((nBitsTotal << 8)  | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                (((nBitsTotal << 24) | (nBitsTotal >>> 8))  & 0xff00ff00)\n");
        sb.append("\t            );\n");
        sb.append("\t            data.sigBytes = (dataWords.length + 1) * 4;\n");
        sb.append("\n");
        sb.append("\t            // Hash final blocks\n");
        sb.append("\t            this._process();\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var hash = this._hash;\n");
        sb.append("\t            var H = hash.words;\n");
        sb.append("\n");
        sb.append("\t            // Swap endian\n");
        sb.append("\t            for (var i = 0; i < 5; i++) {\n");
        sb.append("\t                // Shortcut\n");
        sb.append("\t                var H_i = H[i];\n");
        sb.append("\n");
        sb.append("\t                // Swap\n");
        sb.append("\t                H[i] = (((H_i << 8)  | (H_i >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                       (((H_i << 24) | (H_i >>> 8))  & 0xff00ff00);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Return final computed hash\n");
        sb.append("\t            return hash;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        clone: function () {\n");
        sb.append("\t            var clone = Hasher.clone.call(this);\n");
        sb.append("\t            clone._hash = this._hash.clone();\n");
        sb.append("\n");
        sb.append("\t            return clone;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t    function f1(x, y, z) {\n");
        sb.append("\t        return ((x) ^ (y) ^ (z));\n");
        sb.append("\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function f2(x, y, z) {\n");
        sb.append("\t        return (((x)&(y)) | ((~x)&(z)));\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function f3(x, y, z) {\n");
        sb.append("\t        return (((x) | (~(y))) ^ (z));\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function f4(x, y, z) {\n");
        sb.append("\t        return (((x) & (z)) | ((y)&(~(z))));\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function f5(x, y, z) {\n");
        sb.append("\t        return ((x) ^ ((y) |(~(z))));\n");
        sb.append("\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function rotl(x,n) {\n");
        sb.append("\t        return (x<<n) | (x>>>(32-n));\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the hasher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The hash.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hash = CryptoJS.RIPEMD160('message');\n");
        sb.append("\t     *     var hash = CryptoJS.RIPEMD160(wordArray);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut function to the HMAC's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} message The message to hash.\n");
        sb.append("\t     * @param {WordArray|string} key The secret key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The HMAC.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var hmac = CryptoJS.HmacRIPEMD160(message, key);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n");
        sb.append("\t}(Math));\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Base = C_lib.Base;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\t    var Utf8 = C_enc.Utf8;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * HMAC algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var HMAC = C_algo.HMAC = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created HMAC.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Hasher} hasher The hash algorithm to use.\n");
        sb.append("\t         * @param {WordArray|string} key The secret key.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (hasher, key) {\n");
        sb.append("\t            // Init hasher\n");
        sb.append("\t            hasher = this._hasher = new hasher.init();\n");
        sb.append("\n");
        sb.append("\t            // Convert string to WordArray, else assume WordArray already\n");
        sb.append("\t            if (typeof key == 'string') {\n");
        sb.append("\t                key = Utf8.parse(key);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var hasherBlockSize = hasher.blockSize;\n");
        sb.append("\t            var hasherBlockSizeBytes = hasherBlockSize * 4;\n");
        sb.append("\n");
        sb.append("\t            // Allow arbitrary length keys\n");
        sb.append("\t            if (key.sigBytes > hasherBlockSizeBytes) {\n");
        sb.append("\t                key = hasher.finalize(key);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Clamp excess bits\n");
        sb.append("\t            key.clamp();\n");
        sb.append("\n");
        sb.append("\t            // Clone key for inner and outer pads\n");
        sb.append("\t            var oKey = this._oKey = key.clone();\n");
        sb.append("\t            var iKey = this._iKey = key.clone();\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var oKeyWords = oKey.words;\n");
        sb.append("\t            var iKeyWords = iKey.words;\n");
        sb.append("\n");
        sb.append("\t            // XOR keys with pad constants\n");
        sb.append("\t            for (var i = 0; i < hasherBlockSize; i++) {\n");
        sb.append("\t                oKeyWords[i] ^= 0x5c5c5c5c;\n");
        sb.append("\t                iKeyWords[i] ^= 0x36363636;\n");
        sb.append("\t            }\n");
        sb.append("\t            oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n");
        sb.append("\n");
        sb.append("\t            // Set initial values\n");
        sb.append("\t            this.reset();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Resets this HMAC to its initial state.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     hmacHasher.reset();\n");
        sb.append("\t         */\n");
        sb.append("\t        reset: function () {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var hasher = this._hasher;\n");
        sb.append("\n");
        sb.append("\t            // Reset\n");
        sb.append("\t            hasher.reset();\n");
        sb.append("\t            hasher.update(this._iKey);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Updates this HMAC with a message.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} messageUpdate The message to append.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {HMAC} This HMAC instance.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     hmacHasher.update('message');\n");
        sb.append("\t         *     hmacHasher.update(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        update: function (messageUpdate) {\n");
        sb.append("\t            this._hasher.update(messageUpdate);\n");
        sb.append("\n");
        sb.append("\t            // Chainable\n");
        sb.append("\t            return this;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Finalizes the HMAC computation.\n");
        sb.append("\t         * Note that the finalize operation is effectively a destructive, read-once operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} messageUpdate (Optional) A final message update.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The HMAC.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hmac = hmacHasher.finalize();\n");
        sb.append("\t         *     var hmac = hmacHasher.finalize('message');\n");
        sb.append("\t         *     var hmac = hmacHasher.finalize(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        finalize: function (messageUpdate) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var hasher = this._hasher;\n");
        sb.append("\n");
        sb.append("\t            // Compute HMAC\n");
        sb.append("\t            var innerHash = hasher.finalize(messageUpdate);\n");
        sb.append("\t            hasher.reset();\n");
        sb.append("\t            var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n");
        sb.append("\n");
        sb.append("\t            return hmac;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Base = C_lib.Base;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\t    var SHA1 = C_algo.SHA1;\n");
        sb.append("\t    var HMAC = C_algo.HMAC;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Password-Based Key Derivation Function 2 algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n");
        sb.append("\t         * @property {Hasher} hasher The hasher to use. Default: SHA1\n");
        sb.append("\t         * @property {number} iterations The number of iterations to perform. Default: 1\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Base.extend({\n");
        sb.append("\t            keySize: 128/32,\n");
        sb.append("\t            hasher: SHA1,\n");
        sb.append("\t            iterations: 1\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created key derivation function.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.PBKDF2.create();\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (cfg) {\n");
        sb.append("\t            this.cfg = this.cfg.extend(cfg);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Computes the Password-Based Key Derivation Function 2.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} password The password.\n");
        sb.append("\t         * @param {WordArray|string} salt A salt.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The derived key.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var key = kdf.compute(password, salt);\n");
        sb.append("\t         */\n");
        sb.append("\t        compute: function (password, salt) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var cfg = this.cfg;\n");
        sb.append("\n");
        sb.append("\t            // Init HMAC\n");
        sb.append("\t            var hmac = HMAC.create(cfg.hasher, password);\n");
        sb.append("\n");
        sb.append("\t            // Initial values\n");
        sb.append("\t            var derivedKey = WordArray.create();\n");
        sb.append("\t            var blockIndex = WordArray.create([0x00000001]);\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var derivedKeyWords = derivedKey.words;\n");
        sb.append("\t            var blockIndexWords = blockIndex.words;\n");
        sb.append("\t            var keySize = cfg.keySize;\n");
        sb.append("\t            var iterations = cfg.iterations;\n");
        sb.append("\n");
        sb.append("\t            // Generate key\n");
        sb.append("\t            while (derivedKeyWords.length < keySize) {\n");
        sb.append("\t                var block = hmac.update(salt).finalize(blockIndex);\n");
        sb.append("\t                hmac.reset();\n");
        sb.append("\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var blockWords = block.words;\n");
        sb.append("\t                var blockWordsLength = blockWords.length;\n");
        sb.append("\n");
        sb.append("\t                // Iterations\n");
        sb.append("\t                var intermediate = block;\n");
        sb.append("\t                for (var i = 1; i < iterations; i++) {\n");
        sb.append("\t                    intermediate = hmac.finalize(intermediate);\n");
        sb.append("\t                    hmac.reset();\n");
        sb.append("\n");
        sb.append("\t                    // Shortcut\n");
        sb.append("\t                    var intermediateWords = intermediate.words;\n");
        sb.append("\n");
        sb.append("\t                    // XOR intermediate with block\n");
        sb.append("\t                    for (var j = 0; j < blockWordsLength; j++) {\n");
        sb.append("\t                        blockWords[j] ^= intermediateWords[j];\n");
        sb.append("\t                    }\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                derivedKey.concat(block);\n");
        sb.append("\t                blockIndexWords[0]++;\n");
        sb.append("\t            }\n");
        sb.append("\t            derivedKey.sigBytes = keySize * 4;\n");
        sb.append("\n");
        sb.append("\t            return derivedKey;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Computes the Password-Based Key Derivation Function 2.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} password The password.\n");
        sb.append("\t     * @param {WordArray|string} salt A salt.\n");
        sb.append("\t     * @param {Object} cfg (Optional) The configuration options to use for this computation.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The derived key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var key = CryptoJS.PBKDF2(password, salt);\n");
        sb.append("\t     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n");
        sb.append("\t     *     var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n");
        sb.append("\t     */\n");
        sb.append("\t    C.PBKDF2 = function (password, salt, cfg) {\n");
        sb.append("\t        return PBKDF2.create(cfg).compute(password, salt);\n");
        sb.append("\t    };\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Base = C_lib.Base;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\t    var MD5 = C_algo.MD5;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * This key derivation function is meant to conform with EVP_BytesToKey.\n");
        sb.append("\t     * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n");
        sb.append("\t     */\n");
        sb.append("\t    var EvpKDF = C_algo.EvpKDF = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n");
        sb.append("\t         * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n");
        sb.append("\t         * @property {number} iterations The number of iterations to perform. Default: 1\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Base.extend({\n");
        sb.append("\t            keySize: 128/32,\n");
        sb.append("\t            hasher: MD5,\n");
        sb.append("\t            iterations: 1\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created key derivation function.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.EvpKDF.create();\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n");
        sb.append("\t         *     var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (cfg) {\n");
        sb.append("\t            this.cfg = this.cfg.extend(cfg);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Derives a key from a password.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} password The password.\n");
        sb.append("\t         * @param {WordArray|string} salt A salt.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The derived key.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var key = kdf.compute(password, salt);\n");
        sb.append("\t         */\n");
        sb.append("\t        compute: function (password, salt) {\n");
        sb.append("\t            var block;\n");
        sb.append("\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var cfg = this.cfg;\n");
        sb.append("\n");
        sb.append("\t            // Init hasher\n");
        sb.append("\t            var hasher = cfg.hasher.create();\n");
        sb.append("\n");
        sb.append("\t            // Initial values\n");
        sb.append("\t            var derivedKey = WordArray.create();\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var derivedKeyWords = derivedKey.words;\n");
        sb.append("\t            var keySize = cfg.keySize;\n");
        sb.append("\t            var iterations = cfg.iterations;\n");
        sb.append("\n");
        sb.append("\t            // Generate key\n");
        sb.append("\t            while (derivedKeyWords.length < keySize) {\n");
        sb.append("\t                if (block) {\n");
        sb.append("\t                    hasher.update(block);\n");
        sb.append("\t                }\n");
        sb.append("\t                block = hasher.update(password).finalize(salt);\n");
        sb.append("\t                hasher.reset();\n");
        sb.append("\n");
        sb.append("\t                // Iterations\n");
        sb.append("\t                for (var i = 1; i < iterations; i++) {\n");
        sb.append("\t                    block = hasher.finalize(block);\n");
        sb.append("\t                    hasher.reset();\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                derivedKey.concat(block);\n");
        sb.append("\t            }\n");
        sb.append("\t            derivedKey.sigBytes = keySize * 4;\n");
        sb.append("\n");
        sb.append("\t            return derivedKey;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Derives a key from a password.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @param {WordArray|string} password The password.\n");
        sb.append("\t     * @param {WordArray|string} salt A salt.\n");
        sb.append("\t     * @param {Object} cfg (Optional) The configuration options to use for this computation.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @return {WordArray} The derived key.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @static\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var key = CryptoJS.EvpKDF(password, salt);\n");
        sb.append("\t     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n");
        sb.append("\t     *     var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n");
        sb.append("\t     */\n");
        sb.append("\t    C.EvpKDF = function (password, salt, cfg) {\n");
        sb.append("\t        return EvpKDF.create(cfg).compute(password, salt);\n");
        sb.append("\t    };\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Cipher core components.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.lib.Cipher || (function (undefined) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var Base = C_lib.Base;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\t    var Utf8 = C_enc.Utf8;\n");
        sb.append("\t    var Base64 = C_enc.Base64;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\t    var EvpKDF = C_algo.EvpKDF;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract base cipher template.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n");
        sb.append("\t     * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n");
        sb.append("\t     * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n");
        sb.append("\t     * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {WordArray} iv The IV to use for this operation.\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Base.extend(),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates this cipher in encryption mode.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} key The key.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Cipher} A cipher instance.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n");
        sb.append("\t         */\n");
        sb.append("\t        createEncryptor: function (key, cfg) {\n");
        sb.append("\t            return this.create(this._ENC_XFORM_MODE, key, cfg);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates this cipher in decryption mode.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} key The key.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Cipher} A cipher instance.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n");
        sb.append("\t         */\n");
        sb.append("\t        createDecryptor: function (key, cfg) {\n");
        sb.append("\t            return this.create(this._DEC_XFORM_MODE, key, cfg);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created cipher.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n");
        sb.append("\t         * @param {WordArray} key The key.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (xformMode, key, cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            this.cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Store transform mode and key\n");
        sb.append("\t            this._xformMode = xformMode;\n");
        sb.append("\t            this._key = key;\n");
        sb.append("\n");
        sb.append("\t            // Set initial values\n");
        sb.append("\t            this.reset();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Resets this cipher to its initial state.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     cipher.reset();\n");
        sb.append("\t         */\n");
        sb.append("\t        reset: function () {\n");
        sb.append("\t            // Reset data buffer\n");
        sb.append("\t            BufferedBlockAlgorithm.reset.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Perform concrete-cipher logic\n");
        sb.append("\t            this._doReset();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Adds data to be encrypted or decrypted.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The data after processing.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var encrypted = cipher.process('data');\n");
        sb.append("\t         *     var encrypted = cipher.process(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        process: function (dataUpdate) {\n");
        sb.append("\t            // Append\n");
        sb.append("\t            this._append(dataUpdate);\n");
        sb.append("\n");
        sb.append("\t            // Process available blocks\n");
        sb.append("\t            return this._process();\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Finalizes the encryption or decryption process.\n");
        sb.append("\t         * Note that the finalize operation is effectively a destructive, read-once operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The data after final processing.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var encrypted = cipher.finalize();\n");
        sb.append("\t         *     var encrypted = cipher.finalize('data');\n");
        sb.append("\t         *     var encrypted = cipher.finalize(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        finalize: function (dataUpdate) {\n");
        sb.append("\t            // Final data update\n");
        sb.append("\t            if (dataUpdate) {\n");
        sb.append("\t                this._append(dataUpdate);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Perform concrete-cipher logic\n");
        sb.append("\t            var finalProcessedData = this._doFinalize();\n");
        sb.append("\n");
        sb.append("\t            return finalProcessedData;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        keySize: 128/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 128/32,\n");
        sb.append("\n");
        sb.append("\t        _ENC_XFORM_MODE: 1,\n");
        sb.append("\n");
        sb.append("\t        _DEC_XFORM_MODE: 2,\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates shortcut functions to a cipher's object interface.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher The cipher to create a helper for.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {Object} An object with encrypt and decrypt shortcut functions.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n");
        sb.append("\t         */\n");
        sb.append("\t        _createHelper: (function () {\n");
        sb.append("\t            function selectCipherStrategy(key) {\n");
        sb.append("\t                if (typeof key == 'string') {\n");
        sb.append("\t                    return PasswordBasedCipher;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    return SerializableCipher;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return function (cipher) {\n");
        sb.append("\t                return {\n");
        sb.append("\t                    encrypt: function (message, key, cfg) {\n");
        sb.append("\t                        return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n");
        sb.append("\t                    },\n");
        sb.append("\n");
        sb.append("\t                    decrypt: function (ciphertext, key, cfg) {\n");
        sb.append("\t                        return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n");
        sb.append("\t                    }\n");
        sb.append("\t                };\n");
        sb.append("\t            };\n");
        sb.append("\t        }())\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract base stream cipher template.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n");
        sb.append("\t     */\n");
        sb.append("\t    var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            // Process partial blocks\n");
        sb.append("\t            var finalProcessedBlocks = this._process(!!'flush');\n");
        sb.append("\n");
        sb.append("\t            return finalProcessedBlocks;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 1\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Mode namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_mode = C.mode = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract base block cipher mode template.\n");
        sb.append("\t     */\n");
        sb.append("\t    var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates this mode for encryption.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher A block cipher instance.\n");
        sb.append("\t         * @param {Array} iv The IV words.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n");
        sb.append("\t         */\n");
        sb.append("\t        createEncryptor: function (cipher, iv) {\n");
        sb.append("\t            return this.Encryptor.create(cipher, iv);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Creates this mode for decryption.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher A block cipher instance.\n");
        sb.append("\t         * @param {Array} iv The IV words.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n");
        sb.append("\t         */\n");
        sb.append("\t        createDecryptor: function (cipher, iv) {\n");
        sb.append("\t            return this.Decryptor.create(cipher, iv);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created mode.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher A block cipher instance.\n");
        sb.append("\t         * @param {Array} iv The IV words.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (cipher, iv) {\n");
        sb.append("\t            this._cipher = cipher;\n");
        sb.append("\t            this._iv = iv;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Cipher Block Chaining mode.\n");
        sb.append("\t     */\n");
        sb.append("\t    var CBC = C_mode.CBC = (function () {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Abstract base CBC mode.\n");
        sb.append("\t         */\n");
        sb.append("\t        var CBC = BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * CBC encryptor.\n");
        sb.append("\t         */\n");
        sb.append("\t        CBC.Encryptor = CBC.extend({\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Processes the data block at offset.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @param {Array} words The data words to operate on.\n");
        sb.append("\t             * @param {number} offset The offset where the block starts.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     mode.processBlock(data.words, offset);\n");
        sb.append("\t             */\n");
        sb.append("\t            processBlock: function (words, offset) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var cipher = this._cipher;\n");
        sb.append("\t                var blockSize = cipher.blockSize;\n");
        sb.append("\n");
        sb.append("\t                // XOR and encrypt\n");
        sb.append("\t                xorBlock.call(this, words, offset, blockSize);\n");
        sb.append("\t                cipher.encryptBlock(words, offset);\n");
        sb.append("\n");
        sb.append("\t                // Remember this block to use with next block\n");
        sb.append("\t                this._prevBlock = words.slice(offset, offset + blockSize);\n");
        sb.append("\t            }\n");
        sb.append("\t        });\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * CBC decryptor.\n");
        sb.append("\t         */\n");
        sb.append("\t        CBC.Decryptor = CBC.extend({\n");
        sb.append("\t            /**\n");
        sb.append("\t             * Processes the data block at offset.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @param {Array} words The data words to operate on.\n");
        sb.append("\t             * @param {number} offset The offset where the block starts.\n");
        sb.append("\t             *\n");
        sb.append("\t             * @example\n");
        sb.append("\t             *\n");
        sb.append("\t             *     mode.processBlock(data.words, offset);\n");
        sb.append("\t             */\n");
        sb.append("\t            processBlock: function (words, offset) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var cipher = this._cipher;\n");
        sb.append("\t                var blockSize = cipher.blockSize;\n");
        sb.append("\n");
        sb.append("\t                // Remember this block to use with next block\n");
        sb.append("\t                var thisBlock = words.slice(offset, offset + blockSize);\n");
        sb.append("\n");
        sb.append("\t                // Decrypt and XOR\n");
        sb.append("\t                cipher.decryptBlock(words, offset);\n");
        sb.append("\t                xorBlock.call(this, words, offset, blockSize);\n");
        sb.append("\n");
        sb.append("\t                // This block becomes the previous block\n");
        sb.append("\t                this._prevBlock = thisBlock;\n");
        sb.append("\t            }\n");
        sb.append("\t        });\n");
        sb.append("\n");
        sb.append("\t        function xorBlock(words, offset, blockSize) {\n");
        sb.append("\t            var block;\n");
        sb.append("\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var iv = this._iv;\n");
        sb.append("\n");
        sb.append("\t            // Choose mixing block\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                block = iv;\n");
        sb.append("\n");
        sb.append("\t                // Remove IV for subsequent blocks\n");
        sb.append("\t                this._iv = undefined;\n");
        sb.append("\t            } else {\n");
        sb.append("\t                block = this._prevBlock;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // XOR blocks\n");
        sb.append("\t            for (var i = 0; i < blockSize; i++) {\n");
        sb.append("\t                words[offset + i] ^= block[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        return CBC;\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Padding namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_pad = C.pad = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * PKCS #5/7 padding strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var Pkcs7 = C_pad.Pkcs7 = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Pads data using the algorithm defined in PKCS #5/7.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} data The data to pad.\n");
        sb.append("\t         * @param {number} blockSize The multiple that the data should be padded to.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n");
        sb.append("\t         */\n");
        sb.append("\t        pad: function (data, blockSize) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var blockSizeBytes = blockSize * 4;\n");
        sb.append("\n");
        sb.append("\t            // Count padding bytes\n");
        sb.append("\t            var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n");
        sb.append("\n");
        sb.append("\t            // Create padding word\n");
        sb.append("\t            var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n");
        sb.append("\n");
        sb.append("\t            // Create padding\n");
        sb.append("\t            var paddingWords = [];\n");
        sb.append("\t            for (var i = 0; i < nPaddingBytes; i += 4) {\n");
        sb.append("\t                paddingWords.push(paddingWord);\n");
        sb.append("\t            }\n");
        sb.append("\t            var padding = WordArray.create(paddingWords, nPaddingBytes);\n");
        sb.append("\n");
        sb.append("\t            // Add padding\n");
        sb.append("\t            data.concat(padding);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {WordArray} data The data to unpad.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     CryptoJS.pad.Pkcs7.unpad(wordArray);\n");
        sb.append("\t         */\n");
        sb.append("\t        unpad: function (data) {\n");
        sb.append("\t            // Get number of padding bytes from last byte\n");
        sb.append("\t            var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n");
        sb.append("\n");
        sb.append("\t            // Remove padding\n");
        sb.append("\t            data.sigBytes -= nPaddingBytes;\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Abstract base block cipher template.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n");
        sb.append("\t     */\n");
        sb.append("\t    var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {Mode} mode The block mode to use. Default: CBC\n");
        sb.append("\t         * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Cipher.cfg.extend({\n");
        sb.append("\t            mode: CBC,\n");
        sb.append("\t            padding: Pkcs7\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        reset: function () {\n");
        sb.append("\t            var modeCreator;\n");
        sb.append("\n");
        sb.append("\t            // Reset cipher\n");
        sb.append("\t            Cipher.reset.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cfg = this.cfg;\n");
        sb.append("\t            var iv = cfg.iv;\n");
        sb.append("\t            var mode = cfg.mode;\n");
        sb.append("\n");
        sb.append("\t            // Reset block mode\n");
        sb.append("\t            if (this._xformMode == this._ENC_XFORM_MODE) {\n");
        sb.append("\t                modeCreator = mode.createEncryptor;\n");
        sb.append("\t            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n");
        sb.append("\t                modeCreator = mode.createDecryptor;\n");
        sb.append("\t                // Keep at least one block in the buffer for unpadding\n");
        sb.append("\t                this._minBufferSize = 1;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            if (this._mode && this._mode.__creator == modeCreator) {\n");
        sb.append("\t                this._mode.init(this, iv && iv.words);\n");
        sb.append("\t            } else {\n");
        sb.append("\t                this._mode = modeCreator.call(mode, this, iv && iv.words);\n");
        sb.append("\t                this._mode.__creator = modeCreator;\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (words, offset) {\n");
        sb.append("\t            this._mode.processBlock(words, offset);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doFinalize: function () {\n");
        sb.append("\t            var finalProcessedBlocks;\n");
        sb.append("\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var padding = this.cfg.padding;\n");
        sb.append("\n");
        sb.append("\t            // Finalize\n");
        sb.append("\t            if (this._xformMode == this._ENC_XFORM_MODE) {\n");
        sb.append("\t                // Pad data\n");
        sb.append("\t                padding.pad(this._data, this.blockSize);\n");
        sb.append("\n");
        sb.append("\t                // Process final blocks\n");
        sb.append("\t                finalProcessedBlocks = this._process(!!'flush');\n");
        sb.append("\t            } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n");
        sb.append("\t                // Process final blocks\n");
        sb.append("\t                finalProcessedBlocks = this._process(!!'flush');\n");
        sb.append("\n");
        sb.append("\t                // Unpad data\n");
        sb.append("\t                padding.unpad(finalProcessedBlocks);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return finalProcessedBlocks;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 128/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * A collection of cipher parameters.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @property {WordArray} ciphertext The raw ciphertext.\n");
        sb.append("\t     * @property {WordArray} key The key to this ciphertext.\n");
        sb.append("\t     * @property {WordArray} iv The IV used in the ciphering operation.\n");
        sb.append("\t     * @property {WordArray} salt The salt used with a key derivation function.\n");
        sb.append("\t     * @property {Cipher} algorithm The cipher algorithm.\n");
        sb.append("\t     * @property {Mode} mode The block mode used in the ciphering operation.\n");
        sb.append("\t     * @property {Padding} padding The padding scheme used in the ciphering operation.\n");
        sb.append("\t     * @property {number} blockSize The block size of the cipher.\n");
        sb.append("\t     * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n");
        sb.append("\t     */\n");
        sb.append("\t    var CipherParams = C_lib.CipherParams = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Initializes a newly created cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Object} cipherParams An object with any of the possible cipher parameters.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipherParams = CryptoJS.lib.CipherParams.create({\n");
        sb.append("\t         *         ciphertext: ciphertextWordArray,\n");
        sb.append("\t         *         key: keyWordArray,\n");
        sb.append("\t         *         iv: ivWordArray,\n");
        sb.append("\t         *         salt: saltWordArray,\n");
        sb.append("\t         *         algorithm: CryptoJS.algo.AES,\n");
        sb.append("\t         *         mode: CryptoJS.mode.CBC,\n");
        sb.append("\t         *         padding: CryptoJS.pad.PKCS7,\n");
        sb.append("\t         *         blockSize: 4,\n");
        sb.append("\t         *         formatter: CryptoJS.format.OpenSSL\n");
        sb.append("\t         *     });\n");
        sb.append("\t         */\n");
        sb.append("\t        init: function (cipherParams) {\n");
        sb.append("\t            this.mixIn(cipherParams);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts this cipher params object to a string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Format} formatter (Optional) The formatting strategy to use.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The stringified cipher params.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @throws Error If neither the formatter nor the default formatter is set.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var string = cipherParams + '';\n");
        sb.append("\t         *     var string = cipherParams.toString();\n");
        sb.append("\t         *     var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n");
        sb.append("\t         */\n");
        sb.append("\t        toString: function (formatter) {\n");
        sb.append("\t            return (formatter || this.formatter).stringify(this);\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Format namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_format = C.format = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * OpenSSL formatting strategy.\n");
        sb.append("\t     */\n");
        sb.append("\t    var OpenSSLFormatter = C_format.OpenSSL = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a cipher params object to an OpenSSL-compatible string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {CipherParams} cipherParams The cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The OpenSSL-compatible string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (cipherParams) {\n");
        sb.append("\t            var wordArray;\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var ciphertext = cipherParams.ciphertext;\n");
        sb.append("\t            var salt = cipherParams.salt;\n");
        sb.append("\n");
        sb.append("\t            // Format\n");
        sb.append("\t            if (salt) {\n");
        sb.append("\t                wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n");
        sb.append("\t            } else {\n");
        sb.append("\t                wordArray = ciphertext;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return wordArray.toString(Base64);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts an OpenSSL-compatible string to a cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} openSSLStr The OpenSSL-compatible string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} The cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (openSSLStr) {\n");
        sb.append("\t            var salt;\n");
        sb.append("\n");
        sb.append("\t            // Parse base64\n");
        sb.append("\t            var ciphertext = Base64.parse(openSSLStr);\n");
        sb.append("\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var ciphertextWords = ciphertext.words;\n");
        sb.append("\n");
        sb.append("\t            // Test for salt\n");
        sb.append("\t            if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n");
        sb.append("\t                // Extract salt\n");
        sb.append("\t                salt = WordArray.create(ciphertextWords.slice(2, 4));\n");
        sb.append("\n");
        sb.append("\t                // Remove salt from ciphertext\n");
        sb.append("\t                ciphertextWords.splice(0, 4);\n");
        sb.append("\t                ciphertext.sigBytes -= 16;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n");
        sb.append("\t     */\n");
        sb.append("\t    var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: Base.extend({\n");
        sb.append("\t            format: OpenSSLFormatter\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Encrypts a message.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher The cipher algorithm to use.\n");
        sb.append("\t         * @param {WordArray|string} message The message to encrypt.\n");
        sb.append("\t         * @param {WordArray} key The key.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} A cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         */\n");
        sb.append("\t        encrypt: function (cipher, message, key, cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Encrypt\n");
        sb.append("\t            var encryptor = cipher.createEncryptor(key, cfg);\n");
        sb.append("\t            var ciphertext = encryptor.finalize(message);\n");
        sb.append("\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var cipherCfg = encryptor.cfg;\n");
        sb.append("\n");
        sb.append("\t            // Create and return serializable cipher params\n");
        sb.append("\t            return CipherParams.create({\n");
        sb.append("\t                ciphertext: ciphertext,\n");
        sb.append("\t                key: key,\n");
        sb.append("\t                iv: cipherCfg.iv,\n");
        sb.append("\t                algorithm: cipher,\n");
        sb.append("\t                mode: cipherCfg.mode,\n");
        sb.append("\t                padding: cipherCfg.padding,\n");
        sb.append("\t                blockSize: cipher.blockSize,\n");
        sb.append("\t                formatter: cfg.format\n");
        sb.append("\t            });\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Decrypts serialized ciphertext.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher The cipher algorithm to use.\n");
        sb.append("\t         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n");
        sb.append("\t         * @param {WordArray} key The key.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The plaintext.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         *     var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         */\n");
        sb.append("\t        decrypt: function (cipher, ciphertext, key, cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Convert string to CipherParams\n");
        sb.append("\t            ciphertext = this._parse(ciphertext, cfg.format);\n");
        sb.append("\n");
        sb.append("\t            // Decrypt\n");
        sb.append("\t            var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n");
        sb.append("\n");
        sb.append("\t            return plaintext;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts serialized ciphertext to CipherParams,\n");
        sb.append("\t         * else assumed CipherParams already and returns ciphertext unchanged.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {CipherParams|string} ciphertext The ciphertext.\n");
        sb.append("\t         * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} The unserialized ciphertext.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n");
        sb.append("\t         */\n");
        sb.append("\t        _parse: function (ciphertext, format) {\n");
        sb.append("\t            if (typeof ciphertext == 'string') {\n");
        sb.append("\t                return format.parse(ciphertext, this);\n");
        sb.append("\t            } else {\n");
        sb.append("\t                return ciphertext;\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Key derivation function namespace.\n");
        sb.append("\t     */\n");
        sb.append("\t    var C_kdf = C.kdf = {};\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * OpenSSL key derivation function.\n");
        sb.append("\t     */\n");
        sb.append("\t    var OpenSSLKdf = C_kdf.OpenSSL = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Derives a key and IV from a password.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} password The password to derive from.\n");
        sb.append("\t         * @param {number} keySize The size in words of the key to generate.\n");
        sb.append("\t         * @param {number} ivSize The size in words of the IV to generate.\n");
        sb.append("\t         * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} A cipher params object with the key, IV, and salt.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n");
        sb.append("\t         *     var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n");
        sb.append("\t         */\n");
        sb.append("\t        execute: function (password, keySize, ivSize, salt) {\n");
        sb.append("\t            // Generate random salt\n");
        sb.append("\t            if (!salt) {\n");
        sb.append("\t                salt = WordArray.random(64/8);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Derive key and IV\n");
        sb.append("\t            var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n");
        sb.append("\n");
        sb.append("\t            // Separate key and IV\n");
        sb.append("\t            var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n");
        sb.append("\t            key.sigBytes = keySize * 4;\n");
        sb.append("\n");
        sb.append("\t            // Return params\n");
        sb.append("\t            return CipherParams.create({ key: key, iv: iv, salt: salt });\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * A serializable cipher wrapper that derives the key from a password,\n");
        sb.append("\t     * and returns ciphertext as a serializable cipher params object.\n");
        sb.append("\t     */\n");
        sb.append("\t    var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: SerializableCipher.cfg.extend({\n");
        sb.append("\t            kdf: OpenSSLKdf\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Encrypts a message using a password.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher The cipher algorithm to use.\n");
        sb.append("\t         * @param {WordArray|string} message The message to encrypt.\n");
        sb.append("\t         * @param {string} password The password.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} A cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n");
        sb.append("\t         *     var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         */\n");
        sb.append("\t        encrypt: function (cipher, message, password, cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Derive key and other params\n");
        sb.append("\t            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n");
        sb.append("\n");
        sb.append("\t            // Add IV to config\n");
        sb.append("\t            cfg.iv = derivedParams.iv;\n");
        sb.append("\n");
        sb.append("\t            // Encrypt\n");
        sb.append("\t            var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n");
        sb.append("\n");
        sb.append("\t            // Mix in derived params\n");
        sb.append("\t            ciphertext.mixIn(derivedParams);\n");
        sb.append("\n");
        sb.append("\t            return ciphertext;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Decrypts serialized ciphertext using a password.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {Cipher} cipher The cipher algorithm to use.\n");
        sb.append("\t         * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n");
        sb.append("\t         * @param {string} password The password.\n");
        sb.append("\t         * @param {Object} cfg (Optional) The configuration options to use for this operation.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {WordArray} The plaintext.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         *     var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n");
        sb.append("\t         */\n");
        sb.append("\t        decrypt: function (cipher, ciphertext, password, cfg) {\n");
        sb.append("\t            // Apply config defaults\n");
        sb.append("\t            cfg = this.cfg.extend(cfg);\n");
        sb.append("\n");
        sb.append("\t            // Convert string to CipherParams\n");
        sb.append("\t            ciphertext = this._parse(ciphertext, cfg.format);\n");
        sb.append("\n");
        sb.append("\t            // Derive key and other params\n");
        sb.append("\t            var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n");
        sb.append("\n");
        sb.append("\t            // Add IV to config\n");
        sb.append("\t            cfg.iv = derivedParams.iv;\n");
        sb.append("\n");
        sb.append("\t            // Decrypt\n");
        sb.append("\t            var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n");
        sb.append("\n");
        sb.append("\t            return plaintext;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Cipher Feedback block mode.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.mode.CFB = (function () {\n");
        sb.append("\t    var CFB = CryptoJS.lib.BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t    CFB.Encryptor = CFB.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cipher = this._cipher;\n");
        sb.append("\t            var blockSize = cipher.blockSize;\n");
        sb.append("\n");
        sb.append("\t            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n");
        sb.append("\n");
        sb.append("\t            // Remember this block to use with next block\n");
        sb.append("\t            this._prevBlock = words.slice(offset, offset + blockSize);\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    CFB.Decryptor = CFB.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cipher = this._cipher;\n");
        sb.append("\t            var blockSize = cipher.blockSize;\n");
        sb.append("\n");
        sb.append("\t            // Remember this block to use with next block\n");
        sb.append("\t            var thisBlock = words.slice(offset, offset + blockSize);\n");
        sb.append("\n");
        sb.append("\t            generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n");
        sb.append("\n");
        sb.append("\t            // This block becomes the previous block\n");
        sb.append("\t            this._prevBlock = thisBlock;\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n");
        sb.append("\t        var keystream;\n");
        sb.append("\n");
        sb.append("\t        // Shortcut\n");
        sb.append("\t        var iv = this._iv;\n");
        sb.append("\n");
        sb.append("\t        // Generate keystream\n");
        sb.append("\t        if (iv) {\n");
        sb.append("\t            keystream = iv.slice(0);\n");
        sb.append("\n");
        sb.append("\t            // Remove IV for subsequent blocks\n");
        sb.append("\t            this._iv = undefined;\n");
        sb.append("\t        } else {\n");
        sb.append("\t            keystream = this._prevBlock;\n");
        sb.append("\t        }\n");
        sb.append("\t        cipher.encryptBlock(keystream, 0);\n");
        sb.append("\n");
        sb.append("\t        // Encrypt\n");
        sb.append("\t        for (var i = 0; i < blockSize; i++) {\n");
        sb.append("\t            words[offset + i] ^= keystream[i];\n");
        sb.append("\t        }\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    return CFB;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Counter block mode.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.mode.CTR = (function () {\n");
        sb.append("\t    var CTR = CryptoJS.lib.BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t    var Encryptor = CTR.Encryptor = CTR.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cipher = this._cipher\n");
        sb.append("\t            var blockSize = cipher.blockSize;\n");
        sb.append("\t            var iv = this._iv;\n");
        sb.append("\t            var counter = this._counter;\n");
        sb.append("\n");
        sb.append("\t            // Generate keystream\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                counter = this._counter = iv.slice(0);\n");
        sb.append("\n");
        sb.append("\t                // Remove IV for subsequent blocks\n");
        sb.append("\t                this._iv = undefined;\n");
        sb.append("\t            }\n");
        sb.append("\t            var keystream = counter.slice(0);\n");
        sb.append("\t            cipher.encryptBlock(keystream, 0);\n");
        sb.append("\n");
        sb.append("\t            // Increment counter\n");
        sb.append("\t            counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n");
        sb.append("\n");
        sb.append("\t            // Encrypt\n");
        sb.append("\t            for (var i = 0; i < blockSize; i++) {\n");
        sb.append("\t                words[offset + i] ^= keystream[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    CTR.Decryptor = Encryptor;\n");
        sb.append("\n");
        sb.append("\t    return CTR;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/** @preserve\n");
        sb.append("\t * Counter block mode compatible with  Dr Brian Gladman fileenc.c\n");
        sb.append("\t * derived from CryptoJS.mode.CTR\n");
        sb.append("\t * Jan Hruby jhruby.web@gmail.com\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.mode.CTRGladman = (function () {\n");
        sb.append("\t    var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t\tfunction incWord(word)\n");
        sb.append("\t\t{\n");
        sb.append("\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n");
        sb.append("\t\t\tvar b1 = (word >> 16)&0xff;\n");
        sb.append("\t\t\tvar b2 = (word >> 8)&0xff;\n");
        sb.append("\t\t\tvar b3 = word & 0xff;\n");
        sb.append("\n");
        sb.append("\t\t\tif (b1 === 0xff) // overflow b1\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\tb1 = 0;\n");
        sb.append("\t\t\tif (b2 === 0xff)\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\t\tb2 = 0;\n");
        sb.append("\t\t\t\tif (b3 === 0xff)\n");
        sb.append("\t\t\t\t{\n");
        sb.append("\t\t\t\t\tb3 = 0;\n");
        sb.append("\t\t\t\t}\n");
        sb.append("\t\t\t\telse\n");
        sb.append("\t\t\t\t{\n");
        sb.append("\t\t\t\t\t++b3;\n");
        sb.append("\t\t\t\t}\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\telse\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\t\t++b2;\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\telse\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\t++b1;\n");
        sb.append("\t\t\t}\n");
        sb.append("\n");
        sb.append("\t\t\tword = 0;\n");
        sb.append("\t\t\tword += (b1 << 16);\n");
        sb.append("\t\t\tword += (b2 << 8);\n");
        sb.append("\t\t\tword += b3;\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\telse\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\tword += (0x01 << 24);\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\treturn word;\n");
        sb.append("\t\t}\n");
        sb.append("\n");
        sb.append("\t\tfunction incCounter(counter)\n");
        sb.append("\t\t{\n");
        sb.append("\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n");
        sb.append("\t\t\t{\n");
        sb.append("\t\t\t\t// encr_data in fileenc.c from  Dr Brian Gladman's counts only with DWORD j < 8\n");
        sb.append("\t\t\t\tcounter[1] = incWord(counter[1]);\n");
        sb.append("\t\t\t}\n");
        sb.append("\t\t\treturn counter;\n");
        sb.append("\t\t}\n");
        sb.append("\n");
        sb.append("\t    var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cipher = this._cipher\n");
        sb.append("\t            var blockSize = cipher.blockSize;\n");
        sb.append("\t            var iv = this._iv;\n");
        sb.append("\t            var counter = this._counter;\n");
        sb.append("\n");
        sb.append("\t            // Generate keystream\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                counter = this._counter = iv.slice(0);\n");
        sb.append("\n");
        sb.append("\t                // Remove IV for subsequent blocks\n");
        sb.append("\t                this._iv = undefined;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t\t\t\tincCounter(counter);\n");
        sb.append("\n");
        sb.append("\t\t\t\tvar keystream = counter.slice(0);\n");
        sb.append("\t            cipher.encryptBlock(keystream, 0);\n");
        sb.append("\n");
        sb.append("\t            // Encrypt\n");
        sb.append("\t            for (var i = 0; i < blockSize; i++) {\n");
        sb.append("\t                words[offset + i] ^= keystream[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    CTRGladman.Decryptor = Encryptor;\n");
        sb.append("\n");
        sb.append("\t    return CTRGladman;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Output Feedback block mode.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.mode.OFB = (function () {\n");
        sb.append("\t    var OFB = CryptoJS.lib.BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t    var Encryptor = OFB.Encryptor = OFB.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var cipher = this._cipher\n");
        sb.append("\t            var blockSize = cipher.blockSize;\n");
        sb.append("\t            var iv = this._iv;\n");
        sb.append("\t            var keystream = this._keystream;\n");
        sb.append("\n");
        sb.append("\t            // Generate keystream\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                keystream = this._keystream = iv.slice(0);\n");
        sb.append("\n");
        sb.append("\t                // Remove IV for subsequent blocks\n");
        sb.append("\t                this._iv = undefined;\n");
        sb.append("\t            }\n");
        sb.append("\t            cipher.encryptBlock(keystream, 0);\n");
        sb.append("\n");
        sb.append("\t            // Encrypt\n");
        sb.append("\t            for (var i = 0; i < blockSize; i++) {\n");
        sb.append("\t                words[offset + i] ^= keystream[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    OFB.Decryptor = Encryptor;\n");
        sb.append("\n");
        sb.append("\t    return OFB;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Electronic Codebook block mode.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.mode.ECB = (function () {\n");
        sb.append("\t    var ECB = CryptoJS.lib.BlockCipherMode.extend();\n");
        sb.append("\n");
        sb.append("\t    ECB.Encryptor = ECB.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            this._cipher.encryptBlock(words, offset);\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    ECB.Decryptor = ECB.extend({\n");
        sb.append("\t        processBlock: function (words, offset) {\n");
        sb.append("\t            this._cipher.decryptBlock(words, offset);\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    return ECB;\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * ANSI X.923 padding strategy.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.pad.AnsiX923 = {\n");
        sb.append("\t    pad: function (data, blockSize) {\n");
        sb.append("\t        // Shortcuts\n");
        sb.append("\t        var dataSigBytes = data.sigBytes;\n");
        sb.append("\t        var blockSizeBytes = blockSize * 4;\n");
        sb.append("\n");
        sb.append("\t        // Count padding bytes\n");
        sb.append("\t        var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n");
        sb.append("\n");
        sb.append("\t        // Compute last byte position\n");
        sb.append("\t        var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n");
        sb.append("\n");
        sb.append("\t        // Pad\n");
        sb.append("\t        data.clamp();\n");
        sb.append("\t        data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n");
        sb.append("\t        data.sigBytes += nPaddingBytes;\n");
        sb.append("\t    },\n");
        sb.append("\n");
        sb.append("\t    unpad: function (data) {\n");
        sb.append("\t        // Get number of padding bytes from last byte\n");
        sb.append("\t        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n");
        sb.append("\n");
        sb.append("\t        // Remove padding\n");
        sb.append("\t        data.sigBytes -= nPaddingBytes;\n");
        sb.append("\t    }\n");
        sb.append("\t};\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * ISO 10126 padding strategy.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.pad.Iso10126 = {\n");
        sb.append("\t    pad: function (data, blockSize) {\n");
        sb.append("\t        // Shortcut\n");
        sb.append("\t        var blockSizeBytes = blockSize * 4;\n");
        sb.append("\n");
        sb.append("\t        // Count padding bytes\n");
        sb.append("\t        var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n");
        sb.append("\n");
        sb.append("\t        // Pad\n");
        sb.append("\t        data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n");
        sb.append("\t             concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n");
        sb.append("\t    },\n");
        sb.append("\n");
        sb.append("\t    unpad: function (data) {\n");
        sb.append("\t        // Get number of padding bytes from last byte\n");
        sb.append("\t        var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n");
        sb.append("\n");
        sb.append("\t        // Remove padding\n");
        sb.append("\t        data.sigBytes -= nPaddingBytes;\n");
        sb.append("\t    }\n");
        sb.append("\t};\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * ISO/IEC 9797-1 Padding Method 2.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.pad.Iso97971 = {\n");
        sb.append("\t    pad: function (data, blockSize) {\n");
        sb.append("\t        // Add 0x80 byte\n");
        sb.append("\t        data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n");
        sb.append("\n");
        sb.append("\t        // Zero pad the rest\n");
        sb.append("\t        CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n");
        sb.append("\t    },\n");
        sb.append("\n");
        sb.append("\t    unpad: function (data) {\n");
        sb.append("\t        // Remove zero padding\n");
        sb.append("\t        CryptoJS.pad.ZeroPadding.unpad(data);\n");
        sb.append("\n");
        sb.append("\t        // Remove one more byte -- the 0x80 byte\n");
        sb.append("\t        data.sigBytes--;\n");
        sb.append("\t    }\n");
        sb.append("\t};\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * Zero padding strategy.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.pad.ZeroPadding = {\n");
        sb.append("\t    pad: function (data, blockSize) {\n");
        sb.append("\t        // Shortcut\n");
        sb.append("\t        var blockSizeBytes = blockSize * 4;\n");
        sb.append("\n");
        sb.append("\t        // Pad\n");
        sb.append("\t        data.clamp();\n");
        sb.append("\t        data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n");
        sb.append("\t    },\n");
        sb.append("\n");
        sb.append("\t    unpad: function (data) {\n");
        sb.append("\t        // Shortcut\n");
        sb.append("\t        var dataWords = data.words;\n");
        sb.append("\n");
        sb.append("\t        // Unpad\n");
        sb.append("\t        var i = data.sigBytes - 1;\n");
        sb.append("\t        for (var i = data.sigBytes - 1; i >= 0; i--) {\n");
        sb.append("\t            if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n");
        sb.append("\t                data.sigBytes = i + 1;\n");
        sb.append("\t                break;\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    }\n");
        sb.append("\t};\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t/**\n");
        sb.append("\t * A noop padding strategy.\n");
        sb.append("\t */\n");
        sb.append("\tCryptoJS.pad.NoPadding = {\n");
        sb.append("\t    pad: function () {\n");
        sb.append("\t    },\n");
        sb.append("\n");
        sb.append("\t    unpad: function () {\n");
        sb.append("\t    }\n");
        sb.append("\t};\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function (undefined) {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var CipherParams = C_lib.CipherParams;\n");
        sb.append("\t    var C_enc = C.enc;\n");
        sb.append("\t    var Hex = C_enc.Hex;\n");
        sb.append("\t    var C_format = C.format;\n");
        sb.append("\n");
        sb.append("\t    var HexFormatter = C_format.Hex = {\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {CipherParams} cipherParams The cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {string} The hexadecimally encoded string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n");
        sb.append("\t         */\n");
        sb.append("\t        stringify: function (cipherParams) {\n");
        sb.append("\t            return cipherParams.ciphertext.toString(Hex);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @param {string} input The hexadecimally encoded string.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @return {CipherParams} The cipher params object.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @static\n");
        sb.append("\t         *\n");
        sb.append("\t         * @example\n");
        sb.append("\t         *\n");
        sb.append("\t         *     var cipherParams = CryptoJS.format.Hex.parse(hexString);\n");
        sb.append("\t         */\n");
        sb.append("\t        parse: function (input) {\n");
        sb.append("\t            var ciphertext = Hex.parse(input);\n");
        sb.append("\t            return CipherParams.create({ ciphertext: ciphertext });\n");
        sb.append("\t        }\n");
        sb.append("\t    };\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var BlockCipher = C_lib.BlockCipher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Lookup tables\n");
        sb.append("\t    var SBOX = [];\n");
        sb.append("\t    var INV_SBOX = [];\n");
        sb.append("\t    var SUB_MIX_0 = [];\n");
        sb.append("\t    var SUB_MIX_1 = [];\n");
        sb.append("\t    var SUB_MIX_2 = [];\n");
        sb.append("\t    var SUB_MIX_3 = [];\n");
        sb.append("\t    var INV_SUB_MIX_0 = [];\n");
        sb.append("\t    var INV_SUB_MIX_1 = [];\n");
        sb.append("\t    var INV_SUB_MIX_2 = [];\n");
        sb.append("\t    var INV_SUB_MIX_3 = [];\n");
        sb.append("\n");
        sb.append("\t    // Compute lookup tables\n");
        sb.append("\t    (function () {\n");
        sb.append("\t        // Compute double table\n");
        sb.append("\t        var d = [];\n");
        sb.append("\t        for (var i = 0; i < 256; i++) {\n");
        sb.append("\t            if (i < 128) {\n");
        sb.append("\t                d[i] = i << 1;\n");
        sb.append("\t            } else {\n");
        sb.append("\t                d[i] = (i << 1) ^ 0x11b;\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Walk GF(2^8)\n");
        sb.append("\t        var x = 0;\n");
        sb.append("\t        var xi = 0;\n");
        sb.append("\t        for (var i = 0; i < 256; i++) {\n");
        sb.append("\t            // Compute sbox\n");
        sb.append("\t            var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n");
        sb.append("\t            sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n");
        sb.append("\t            SBOX[x] = sx;\n");
        sb.append("\t            INV_SBOX[sx] = x;\n");
        sb.append("\n");
        sb.append("\t            // Compute multiplication\n");
        sb.append("\t            var x2 = d[x];\n");
        sb.append("\t            var x4 = d[x2];\n");
        sb.append("\t            var x8 = d[x4];\n");
        sb.append("\n");
        sb.append("\t            // Compute sub bytes, mix columns tables\n");
        sb.append("\t            var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n");
        sb.append("\t            SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n");
        sb.append("\t            SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n");
        sb.append("\t            SUB_MIX_2[x] = (t << 8)  | (t >>> 24);\n");
        sb.append("\t            SUB_MIX_3[x] = t;\n");
        sb.append("\n");
        sb.append("\t            // Compute inv sub bytes, inv mix columns tables\n");
        sb.append("\t            var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n");
        sb.append("\t            INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n");
        sb.append("\t            INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n");
        sb.append("\t            INV_SUB_MIX_2[sx] = (t << 8)  | (t >>> 24);\n");
        sb.append("\t            INV_SUB_MIX_3[sx] = t;\n");
        sb.append("\n");
        sb.append("\t            // Compute next counter\n");
        sb.append("\t            if (!x) {\n");
        sb.append("\t                x = xi = 1;\n");
        sb.append("\t            } else {\n");
        sb.append("\t                x = x2 ^ d[d[d[x8 ^ x2]]];\n");
        sb.append("\t                xi ^= d[d[xi]];\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    }());\n");
        sb.append("\n");
        sb.append("\t    // Precomputed Rcon lookup\n");
        sb.append("\t    var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * AES block cipher algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var AES = C_algo.AES = BlockCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            var t;\n");
        sb.append("\n");
        sb.append("\t            // Skip reset of nRounds has been set before and key did not change\n");
        sb.append("\t            if (this._nRounds && this._keyPriorReset === this._key) {\n");
        sb.append("\t                return;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var key = this._keyPriorReset = this._key;\n");
        sb.append("\t            var keyWords = key.words;\n");
        sb.append("\t            var keySize = key.sigBytes / 4;\n");
        sb.append("\n");
        sb.append("\t            // Compute number of rounds\n");
        sb.append("\t            var nRounds = this._nRounds = keySize + 6;\n");
        sb.append("\n");
        sb.append("\t            // Compute number of key schedule rows\n");
        sb.append("\t            var ksRows = (nRounds + 1) * 4;\n");
        sb.append("\n");
        sb.append("\t            // Compute key schedule\n");
        sb.append("\t            var keySchedule = this._keySchedule = [];\n");
        sb.append("\t            for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n");
        sb.append("\t                if (ksRow < keySize) {\n");
        sb.append("\t                    keySchedule[ksRow] = keyWords[ksRow];\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    t = keySchedule[ksRow - 1];\n");
        sb.append("\n");
        sb.append("\t                    if (!(ksRow % keySize)) {\n");
        sb.append("\t                        // Rot word\n");
        sb.append("\t                        t = (t << 8) | (t >>> 24);\n");
        sb.append("\n");
        sb.append("\t                        // Sub word\n");
        sb.append("\t                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n");
        sb.append("\n");
        sb.append("\t                        // Mix Rcon\n");
        sb.append("\t                        t ^= RCON[(ksRow / keySize) | 0] << 24;\n");
        sb.append("\t                    } else if (keySize > 6 && ksRow % keySize == 4) {\n");
        sb.append("\t                        // Sub word\n");
        sb.append("\t                        t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n");
        sb.append("\t                    }\n");
        sb.append("\n");
        sb.append("\t                    keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Compute inv key schedule\n");
        sb.append("\t            var invKeySchedule = this._invKeySchedule = [];\n");
        sb.append("\t            for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n");
        sb.append("\t                var ksRow = ksRows - invKsRow;\n");
        sb.append("\n");
        sb.append("\t                if (invKsRow % 4) {\n");
        sb.append("\t                    var t = keySchedule[ksRow];\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    var t = keySchedule[ksRow - 4];\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                if (invKsRow < 4 || ksRow <= 4) {\n");
        sb.append("\t                    invKeySchedule[invKsRow] = t;\n");
        sb.append("\t                } else {\n");
        sb.append("\t                    invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n");
        sb.append("\t                                               INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        encryptBlock: function (M, offset) {\n");
        sb.append("\t            this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        decryptBlock: function (M, offset) {\n");
        sb.append("\t            // Swap 2nd and 4th rows\n");
        sb.append("\t            var t = M[offset + 1];\n");
        sb.append("\t            M[offset + 1] = M[offset + 3];\n");
        sb.append("\t            M[offset + 3] = t;\n");
        sb.append("\n");
        sb.append("\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);\n");
        sb.append("\n");
        sb.append("\t            // Inv swap 2nd and 4th rows\n");
        sb.append("\t            var t = M[offset + 1];\n");
        sb.append("\t            M[offset + 1] = M[offset + 3];\n");
        sb.append("\t            M[offset + 3] = t;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var nRounds = this._nRounds;\n");
        sb.append("\n");
        sb.append("\t            // Get input, add round key\n");
        sb.append("\t            var s0 = M[offset]     ^ keySchedule[0];\n");
        sb.append("\t            var s1 = M[offset + 1] ^ keySchedule[1];\n");
        sb.append("\t            var s2 = M[offset + 2] ^ keySchedule[2];\n");
        sb.append("\t            var s3 = M[offset + 3] ^ keySchedule[3];\n");
        sb.append("\n");
        sb.append("\t            // Key schedule row counter\n");
        sb.append("\t            var ksRow = 4;\n");
        sb.append("\n");
        sb.append("\t            // Rounds\n");
        sb.append("\t            for (var round = 1; round < nRounds; round++) {\n");
        sb.append("\t                // Shift rows, sub bytes, mix columns, add round key\n");
        sb.append("\t                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++];\n");
        sb.append("\t                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++];\n");
        sb.append("\t                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++];\n");
        sb.append("\t                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++];\n");
        sb.append("\n");
        sb.append("\t                // Update state\n");
        sb.append("\t                s0 = t0;\n");
        sb.append("\t                s1 = t1;\n");
        sb.append("\t                s2 = t2;\n");
        sb.append("\t                s3 = t3;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Shift rows, sub bytes, add round key\n");
        sb.append("\t            var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n");
        sb.append("\t            var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n");
        sb.append("\t            var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n");
        sb.append("\t            var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n");
        sb.append("\n");
        sb.append("\t            // Set output\n");
        sb.append("\t            M[offset]     = t0;\n");
        sb.append("\t            M[offset + 1] = t1;\n");
        sb.append("\t            M[offset + 2] = t2;\n");
        sb.append("\t            M[offset + 3] = t3;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        keySize: 256/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.AES = BlockCipher._createHelper(AES);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var WordArray = C_lib.WordArray;\n");
        sb.append("\t    var BlockCipher = C_lib.BlockCipher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Permuted Choice 1 constants\n");
        sb.append("\t    var PC1 = [\n");
        sb.append("\t        57, 49, 41, 33, 25, 17, 9,  1,\n");
        sb.append("\t        58, 50, 42, 34, 26, 18, 10, 2,\n");
        sb.append("\t        59, 51, 43, 35, 27, 19, 11, 3,\n");
        sb.append("\t        60, 52, 44, 36, 63, 55, 47, 39,\n");
        sb.append("\t        31, 23, 15, 7,  62, 54, 46, 38,\n");
        sb.append("\t        30, 22, 14, 6,  61, 53, 45, 37,\n");
        sb.append("\t        29, 21, 13, 5,  28, 20, 12, 4\n");
        sb.append("\t    ];\n");
        sb.append("\n");
        sb.append("\t    // Permuted Choice 2 constants\n");
        sb.append("\t    var PC2 = [\n");
        sb.append("\t        14, 17, 11, 24, 1,  5,\n");
        sb.append("\t        3,  28, 15, 6,  21, 10,\n");
        sb.append("\t        23, 19, 12, 4,  26, 8,\n");
        sb.append("\t        16, 7,  27, 20, 13, 2,\n");
        sb.append("\t        41, 52, 31, 37, 47, 55,\n");
        sb.append("\t        30, 40, 51, 45, 33, 48,\n");
        sb.append("\t        44, 49, 39, 56, 34, 53,\n");
        sb.append("\t        46, 42, 50, 36, 29, 32\n");
        sb.append("\t    ];\n");
        sb.append("\n");
        sb.append("\t    // Cumulative bit shift constants\n");
        sb.append("\t    var BIT_SHIFTS = [1,  2,  4,  6,  8,  10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n");
        sb.append("\n");
        sb.append("\t    // SBOXes and round permutation constants\n");
        sb.append("\t    var SBOX_P = [\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x808200,\n");
        sb.append("\t            0x10000000: 0x8000,\n");
        sb.append("\t            0x20000000: 0x808002,\n");
        sb.append("\t            0x30000000: 0x2,\n");
        sb.append("\t            0x40000000: 0x200,\n");
        sb.append("\t            0x50000000: 0x808202,\n");
        sb.append("\t            0x60000000: 0x800202,\n");
        sb.append("\t            0x70000000: 0x800000,\n");
        sb.append("\t            0x80000000: 0x202,\n");
        sb.append("\t            0x90000000: 0x800200,\n");
        sb.append("\t            0xa0000000: 0x8200,\n");
        sb.append("\t            0xb0000000: 0x808000,\n");
        sb.append("\t            0xc0000000: 0x8002,\n");
        sb.append("\t            0xd0000000: 0x800002,\n");
        sb.append("\t            0xe0000000: 0x0,\n");
        sb.append("\t            0xf0000000: 0x8202,\n");
        sb.append("\t            0x8000000: 0x0,\n");
        sb.append("\t            0x18000000: 0x808202,\n");
        sb.append("\t            0x28000000: 0x8202,\n");
        sb.append("\t            0x38000000: 0x8000,\n");
        sb.append("\t            0x48000000: 0x808200,\n");
        sb.append("\t            0x58000000: 0x200,\n");
        sb.append("\t            0x68000000: 0x808002,\n");
        sb.append("\t            0x78000000: 0x2,\n");
        sb.append("\t            0x88000000: 0x800200,\n");
        sb.append("\t            0x98000000: 0x8200,\n");
        sb.append("\t            0xa8000000: 0x808000,\n");
        sb.append("\t            0xb8000000: 0x800202,\n");
        sb.append("\t            0xc8000000: 0x800002,\n");
        sb.append("\t            0xd8000000: 0x8002,\n");
        sb.append("\t            0xe8000000: 0x202,\n");
        sb.append("\t            0xf8000000: 0x800000,\n");
        sb.append("\t            0x1: 0x8000,\n");
        sb.append("\t            0x10000001: 0x2,\n");
        sb.append("\t            0x20000001: 0x808200,\n");
        sb.append("\t            0x30000001: 0x800000,\n");
        sb.append("\t            0x40000001: 0x808002,\n");
        sb.append("\t            0x50000001: 0x8200,\n");
        sb.append("\t            0x60000001: 0x200,\n");
        sb.append("\t            0x70000001: 0x800202,\n");
        sb.append("\t            0x80000001: 0x808202,\n");
        sb.append("\t            0x90000001: 0x808000,\n");
        sb.append("\t            0xa0000001: 0x800002,\n");
        sb.append("\t            0xb0000001: 0x8202,\n");
        sb.append("\t            0xc0000001: 0x202,\n");
        sb.append("\t            0xd0000001: 0x800200,\n");
        sb.append("\t            0xe0000001: 0x8002,\n");
        sb.append("\t            0xf0000001: 0x0,\n");
        sb.append("\t            0x8000001: 0x808202,\n");
        sb.append("\t            0x18000001: 0x808000,\n");
        sb.append("\t            0x28000001: 0x800000,\n");
        sb.append("\t            0x38000001: 0x200,\n");
        sb.append("\t            0x48000001: 0x8000,\n");
        sb.append("\t            0x58000001: 0x800002,\n");
        sb.append("\t            0x68000001: 0x2,\n");
        sb.append("\t            0x78000001: 0x8202,\n");
        sb.append("\t            0x88000001: 0x8002,\n");
        sb.append("\t            0x98000001: 0x800202,\n");
        sb.append("\t            0xa8000001: 0x202,\n");
        sb.append("\t            0xb8000001: 0x808200,\n");
        sb.append("\t            0xc8000001: 0x800200,\n");
        sb.append("\t            0xd8000001: 0x0,\n");
        sb.append("\t            0xe8000001: 0x8200,\n");
        sb.append("\t            0xf8000001: 0x808002\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x40084010,\n");
        sb.append("\t            0x1000000: 0x4000,\n");
        sb.append("\t            0x2000000: 0x80000,\n");
        sb.append("\t            0x3000000: 0x40080010,\n");
        sb.append("\t            0x4000000: 0x40000010,\n");
        sb.append("\t            0x5000000: 0x40084000,\n");
        sb.append("\t            0x6000000: 0x40004000,\n");
        sb.append("\t            0x7000000: 0x10,\n");
        sb.append("\t            0x8000000: 0x84000,\n");
        sb.append("\t            0x9000000: 0x40004010,\n");
        sb.append("\t            0xa000000: 0x40000000,\n");
        sb.append("\t            0xb000000: 0x84010,\n");
        sb.append("\t            0xc000000: 0x80010,\n");
        sb.append("\t            0xd000000: 0x0,\n");
        sb.append("\t            0xe000000: 0x4010,\n");
        sb.append("\t            0xf000000: 0x40080000,\n");
        sb.append("\t            0x800000: 0x40004000,\n");
        sb.append("\t            0x1800000: 0x84010,\n");
        sb.append("\t            0x2800000: 0x10,\n");
        sb.append("\t            0x3800000: 0x40004010,\n");
        sb.append("\t            0x4800000: 0x40084010,\n");
        sb.append("\t            0x5800000: 0x40000000,\n");
        sb.append("\t            0x6800000: 0x80000,\n");
        sb.append("\t            0x7800000: 0x40080010,\n");
        sb.append("\t            0x8800000: 0x80010,\n");
        sb.append("\t            0x9800000: 0x0,\n");
        sb.append("\t            0xa800000: 0x4000,\n");
        sb.append("\t            0xb800000: 0x40080000,\n");
        sb.append("\t            0xc800000: 0x40000010,\n");
        sb.append("\t            0xd800000: 0x84000,\n");
        sb.append("\t            0xe800000: 0x40084000,\n");
        sb.append("\t            0xf800000: 0x4010,\n");
        sb.append("\t            0x10000000: 0x0,\n");
        sb.append("\t            0x11000000: 0x40080010,\n");
        sb.append("\t            0x12000000: 0x40004010,\n");
        sb.append("\t            0x13000000: 0x40084000,\n");
        sb.append("\t            0x14000000: 0x40080000,\n");
        sb.append("\t            0x15000000: 0x10,\n");
        sb.append("\t            0x16000000: 0x84010,\n");
        sb.append("\t            0x17000000: 0x4000,\n");
        sb.append("\t            0x18000000: 0x4010,\n");
        sb.append("\t            0x19000000: 0x80000,\n");
        sb.append("\t            0x1a000000: 0x80010,\n");
        sb.append("\t            0x1b000000: 0x40000010,\n");
        sb.append("\t            0x1c000000: 0x84000,\n");
        sb.append("\t            0x1d000000: 0x40004000,\n");
        sb.append("\t            0x1e000000: 0x40000000,\n");
        sb.append("\t            0x1f000000: 0x40084010,\n");
        sb.append("\t            0x10800000: 0x84010,\n");
        sb.append("\t            0x11800000: 0x80000,\n");
        sb.append("\t            0x12800000: 0x40080000,\n");
        sb.append("\t            0x13800000: 0x4000,\n");
        sb.append("\t            0x14800000: 0x40004000,\n");
        sb.append("\t            0x15800000: 0x40084010,\n");
        sb.append("\t            0x16800000: 0x10,\n");
        sb.append("\t            0x17800000: 0x40000000,\n");
        sb.append("\t            0x18800000: 0x40084000,\n");
        sb.append("\t            0x19800000: 0x40000010,\n");
        sb.append("\t            0x1a800000: 0x40004010,\n");
        sb.append("\t            0x1b800000: 0x80010,\n");
        sb.append("\t            0x1c800000: 0x0,\n");
        sb.append("\t            0x1d800000: 0x4010,\n");
        sb.append("\t            0x1e800000: 0x40080010,\n");
        sb.append("\t            0x1f800000: 0x84000\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x104,\n");
        sb.append("\t            0x100000: 0x0,\n");
        sb.append("\t            0x200000: 0x4000100,\n");
        sb.append("\t            0x300000: 0x10104,\n");
        sb.append("\t            0x400000: 0x10004,\n");
        sb.append("\t            0x500000: 0x4000004,\n");
        sb.append("\t            0x600000: 0x4010104,\n");
        sb.append("\t            0x700000: 0x4010000,\n");
        sb.append("\t            0x800000: 0x4000000,\n");
        sb.append("\t            0x900000: 0x4010100,\n");
        sb.append("\t            0xa00000: 0x10100,\n");
        sb.append("\t            0xb00000: 0x4010004,\n");
        sb.append("\t            0xc00000: 0x4000104,\n");
        sb.append("\t            0xd00000: 0x10000,\n");
        sb.append("\t            0xe00000: 0x4,\n");
        sb.append("\t            0xf00000: 0x100,\n");
        sb.append("\t            0x80000: 0x4010100,\n");
        sb.append("\t            0x180000: 0x4010004,\n");
        sb.append("\t            0x280000: 0x0,\n");
        sb.append("\t            0x380000: 0x4000100,\n");
        sb.append("\t            0x480000: 0x4000004,\n");
        sb.append("\t            0x580000: 0x10000,\n");
        sb.append("\t            0x680000: 0x10004,\n");
        sb.append("\t            0x780000: 0x104,\n");
        sb.append("\t            0x880000: 0x4,\n");
        sb.append("\t            0x980000: 0x100,\n");
        sb.append("\t            0xa80000: 0x4010000,\n");
        sb.append("\t            0xb80000: 0x10104,\n");
        sb.append("\t            0xc80000: 0x10100,\n");
        sb.append("\t            0xd80000: 0x4000104,\n");
        sb.append("\t            0xe80000: 0x4010104,\n");
        sb.append("\t            0xf80000: 0x4000000,\n");
        sb.append("\t            0x1000000: 0x4010100,\n");
        sb.append("\t            0x1100000: 0x10004,\n");
        sb.append("\t            0x1200000: 0x10000,\n");
        sb.append("\t            0x1300000: 0x4000100,\n");
        sb.append("\t            0x1400000: 0x100,\n");
        sb.append("\t            0x1500000: 0x4010104,\n");
        sb.append("\t            0x1600000: 0x4000004,\n");
        sb.append("\t            0x1700000: 0x0,\n");
        sb.append("\t            0x1800000: 0x4000104,\n");
        sb.append("\t            0x1900000: 0x4000000,\n");
        sb.append("\t            0x1a00000: 0x4,\n");
        sb.append("\t            0x1b00000: 0x10100,\n");
        sb.append("\t            0x1c00000: 0x4010000,\n");
        sb.append("\t            0x1d00000: 0x104,\n");
        sb.append("\t            0x1e00000: 0x10104,\n");
        sb.append("\t            0x1f00000: 0x4010004,\n");
        sb.append("\t            0x1080000: 0x4000000,\n");
        sb.append("\t            0x1180000: 0x104,\n");
        sb.append("\t            0x1280000: 0x4010100,\n");
        sb.append("\t            0x1380000: 0x0,\n");
        sb.append("\t            0x1480000: 0x10004,\n");
        sb.append("\t            0x1580000: 0x4000100,\n");
        sb.append("\t            0x1680000: 0x100,\n");
        sb.append("\t            0x1780000: 0x4010004,\n");
        sb.append("\t            0x1880000: 0x10000,\n");
        sb.append("\t            0x1980000: 0x4010104,\n");
        sb.append("\t            0x1a80000: 0x10104,\n");
        sb.append("\t            0x1b80000: 0x4000004,\n");
        sb.append("\t            0x1c80000: 0x4000104,\n");
        sb.append("\t            0x1d80000: 0x4010000,\n");
        sb.append("\t            0x1e80000: 0x4,\n");
        sb.append("\t            0x1f80000: 0x10100\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x80401000,\n");
        sb.append("\t            0x10000: 0x80001040,\n");
        sb.append("\t            0x20000: 0x401040,\n");
        sb.append("\t            0x30000: 0x80400000,\n");
        sb.append("\t            0x40000: 0x0,\n");
        sb.append("\t            0x50000: 0x401000,\n");
        sb.append("\t            0x60000: 0x80000040,\n");
        sb.append("\t            0x70000: 0x400040,\n");
        sb.append("\t            0x80000: 0x80000000,\n");
        sb.append("\t            0x90000: 0x400000,\n");
        sb.append("\t            0xa0000: 0x40,\n");
        sb.append("\t            0xb0000: 0x80001000,\n");
        sb.append("\t            0xc0000: 0x80400040,\n");
        sb.append("\t            0xd0000: 0x1040,\n");
        sb.append("\t            0xe0000: 0x1000,\n");
        sb.append("\t            0xf0000: 0x80401040,\n");
        sb.append("\t            0x8000: 0x80001040,\n");
        sb.append("\t            0x18000: 0x40,\n");
        sb.append("\t            0x28000: 0x80400040,\n");
        sb.append("\t            0x38000: 0x80001000,\n");
        sb.append("\t            0x48000: 0x401000,\n");
        sb.append("\t            0x58000: 0x80401040,\n");
        sb.append("\t            0x68000: 0x0,\n");
        sb.append("\t            0x78000: 0x80400000,\n");
        sb.append("\t            0x88000: 0x1000,\n");
        sb.append("\t            0x98000: 0x80401000,\n");
        sb.append("\t            0xa8000: 0x400000,\n");
        sb.append("\t            0xb8000: 0x1040,\n");
        sb.append("\t            0xc8000: 0x80000000,\n");
        sb.append("\t            0xd8000: 0x400040,\n");
        sb.append("\t            0xe8000: 0x401040,\n");
        sb.append("\t            0xf8000: 0x80000040,\n");
        sb.append("\t            0x100000: 0x400040,\n");
        sb.append("\t            0x110000: 0x401000,\n");
        sb.append("\t            0x120000: 0x80000040,\n");
        sb.append("\t            0x130000: 0x0,\n");
        sb.append("\t            0x140000: 0x1040,\n");
        sb.append("\t            0x150000: 0x80400040,\n");
        sb.append("\t            0x160000: 0x80401000,\n");
        sb.append("\t            0x170000: 0x80001040,\n");
        sb.append("\t            0x180000: 0x80401040,\n");
        sb.append("\t            0x190000: 0x80000000,\n");
        sb.append("\t            0x1a0000: 0x80400000,\n");
        sb.append("\t            0x1b0000: 0x401040,\n");
        sb.append("\t            0x1c0000: 0x80001000,\n");
        sb.append("\t            0x1d0000: 0x400000,\n");
        sb.append("\t            0x1e0000: 0x40,\n");
        sb.append("\t            0x1f0000: 0x1000,\n");
        sb.append("\t            0x108000: 0x80400000,\n");
        sb.append("\t            0x118000: 0x80401040,\n");
        sb.append("\t            0x128000: 0x0,\n");
        sb.append("\t            0x138000: 0x401000,\n");
        sb.append("\t            0x148000: 0x400040,\n");
        sb.append("\t            0x158000: 0x80000000,\n");
        sb.append("\t            0x168000: 0x80001040,\n");
        sb.append("\t            0x178000: 0x40,\n");
        sb.append("\t            0x188000: 0x80000040,\n");
        sb.append("\t            0x198000: 0x1000,\n");
        sb.append("\t            0x1a8000: 0x80001000,\n");
        sb.append("\t            0x1b8000: 0x80400040,\n");
        sb.append("\t            0x1c8000: 0x1040,\n");
        sb.append("\t            0x1d8000: 0x80401000,\n");
        sb.append("\t            0x1e8000: 0x400000,\n");
        sb.append("\t            0x1f8000: 0x401040\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x80,\n");
        sb.append("\t            0x1000: 0x1040000,\n");
        sb.append("\t            0x2000: 0x40000,\n");
        sb.append("\t            0x3000: 0x20000000,\n");
        sb.append("\t            0x4000: 0x20040080,\n");
        sb.append("\t            0x5000: 0x1000080,\n");
        sb.append("\t            0x6000: 0x21000080,\n");
        sb.append("\t            0x7000: 0x40080,\n");
        sb.append("\t            0x8000: 0x1000000,\n");
        sb.append("\t            0x9000: 0x20040000,\n");
        sb.append("\t            0xa000: 0x20000080,\n");
        sb.append("\t            0xb000: 0x21040080,\n");
        sb.append("\t            0xc000: 0x21040000,\n");
        sb.append("\t            0xd000: 0x0,\n");
        sb.append("\t            0xe000: 0x1040080,\n");
        sb.append("\t            0xf000: 0x21000000,\n");
        sb.append("\t            0x800: 0x1040080,\n");
        sb.append("\t            0x1800: 0x21000080,\n");
        sb.append("\t            0x2800: 0x80,\n");
        sb.append("\t            0x3800: 0x1040000,\n");
        sb.append("\t            0x4800: 0x40000,\n");
        sb.append("\t            0x5800: 0x20040080,\n");
        sb.append("\t            0x6800: 0x21040000,\n");
        sb.append("\t            0x7800: 0x20000000,\n");
        sb.append("\t            0x8800: 0x20040000,\n");
        sb.append("\t            0x9800: 0x0,\n");
        sb.append("\t            0xa800: 0x21040080,\n");
        sb.append("\t            0xb800: 0x1000080,\n");
        sb.append("\t            0xc800: 0x20000080,\n");
        sb.append("\t            0xd800: 0x21000000,\n");
        sb.append("\t            0xe800: 0x1000000,\n");
        sb.append("\t            0xf800: 0x40080,\n");
        sb.append("\t            0x10000: 0x40000,\n");
        sb.append("\t            0x11000: 0x80,\n");
        sb.append("\t            0x12000: 0x20000000,\n");
        sb.append("\t            0x13000: 0x21000080,\n");
        sb.append("\t            0x14000: 0x1000080,\n");
        sb.append("\t            0x15000: 0x21040000,\n");
        sb.append("\t            0x16000: 0x20040080,\n");
        sb.append("\t            0x17000: 0x1000000,\n");
        sb.append("\t            0x18000: 0x21040080,\n");
        sb.append("\t            0x19000: 0x21000000,\n");
        sb.append("\t            0x1a000: 0x1040000,\n");
        sb.append("\t            0x1b000: 0x20040000,\n");
        sb.append("\t            0x1c000: 0x40080,\n");
        sb.append("\t            0x1d000: 0x20000080,\n");
        sb.append("\t            0x1e000: 0x0,\n");
        sb.append("\t            0x1f000: 0x1040080,\n");
        sb.append("\t            0x10800: 0x21000080,\n");
        sb.append("\t            0x11800: 0x1000000,\n");
        sb.append("\t            0x12800: 0x1040000,\n");
        sb.append("\t            0x13800: 0x20040080,\n");
        sb.append("\t            0x14800: 0x20000000,\n");
        sb.append("\t            0x15800: 0x1040080,\n");
        sb.append("\t            0x16800: 0x80,\n");
        sb.append("\t            0x17800: 0x21040000,\n");
        sb.append("\t            0x18800: 0x40080,\n");
        sb.append("\t            0x19800: 0x21040080,\n");
        sb.append("\t            0x1a800: 0x0,\n");
        sb.append("\t            0x1b800: 0x21000000,\n");
        sb.append("\t            0x1c800: 0x1000080,\n");
        sb.append("\t            0x1d800: 0x40000,\n");
        sb.append("\t            0x1e800: 0x20040000,\n");
        sb.append("\t            0x1f800: 0x20000080\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x10000008,\n");
        sb.append("\t            0x100: 0x2000,\n");
        sb.append("\t            0x200: 0x10200000,\n");
        sb.append("\t            0x300: 0x10202008,\n");
        sb.append("\t            0x400: 0x10002000,\n");
        sb.append("\t            0x500: 0x200000,\n");
        sb.append("\t            0x600: 0x200008,\n");
        sb.append("\t            0x700: 0x10000000,\n");
        sb.append("\t            0x800: 0x0,\n");
        sb.append("\t            0x900: 0x10002008,\n");
        sb.append("\t            0xa00: 0x202000,\n");
        sb.append("\t            0xb00: 0x8,\n");
        sb.append("\t            0xc00: 0x10200008,\n");
        sb.append("\t            0xd00: 0x202008,\n");
        sb.append("\t            0xe00: 0x2008,\n");
        sb.append("\t            0xf00: 0x10202000,\n");
        sb.append("\t            0x80: 0x10200000,\n");
        sb.append("\t            0x180: 0x10202008,\n");
        sb.append("\t            0x280: 0x8,\n");
        sb.append("\t            0x380: 0x200000,\n");
        sb.append("\t            0x480: 0x202008,\n");
        sb.append("\t            0x580: 0x10000008,\n");
        sb.append("\t            0x680: 0x10002000,\n");
        sb.append("\t            0x780: 0x2008,\n");
        sb.append("\t            0x880: 0x200008,\n");
        sb.append("\t            0x980: 0x2000,\n");
        sb.append("\t            0xa80: 0x10002008,\n");
        sb.append("\t            0xb80: 0x10200008,\n");
        sb.append("\t            0xc80: 0x0,\n");
        sb.append("\t            0xd80: 0x10202000,\n");
        sb.append("\t            0xe80: 0x202000,\n");
        sb.append("\t            0xf80: 0x10000000,\n");
        sb.append("\t            0x1000: 0x10002000,\n");
        sb.append("\t            0x1100: 0x10200008,\n");
        sb.append("\t            0x1200: 0x10202008,\n");
        sb.append("\t            0x1300: 0x2008,\n");
        sb.append("\t            0x1400: 0x200000,\n");
        sb.append("\t            0x1500: 0x10000000,\n");
        sb.append("\t            0x1600: 0x10000008,\n");
        sb.append("\t            0x1700: 0x202000,\n");
        sb.append("\t            0x1800: 0x202008,\n");
        sb.append("\t            0x1900: 0x0,\n");
        sb.append("\t            0x1a00: 0x8,\n");
        sb.append("\t            0x1b00: 0x10200000,\n");
        sb.append("\t            0x1c00: 0x2000,\n");
        sb.append("\t            0x1d00: 0x10002008,\n");
        sb.append("\t            0x1e00: 0x10202000,\n");
        sb.append("\t            0x1f00: 0x200008,\n");
        sb.append("\t            0x1080: 0x8,\n");
        sb.append("\t            0x1180: 0x202000,\n");
        sb.append("\t            0x1280: 0x200000,\n");
        sb.append("\t            0x1380: 0x10000008,\n");
        sb.append("\t            0x1480: 0x10002000,\n");
        sb.append("\t            0x1580: 0x2008,\n");
        sb.append("\t            0x1680: 0x10202008,\n");
        sb.append("\t            0x1780: 0x10200000,\n");
        sb.append("\t            0x1880: 0x10202000,\n");
        sb.append("\t            0x1980: 0x10200008,\n");
        sb.append("\t            0x1a80: 0x2000,\n");
        sb.append("\t            0x1b80: 0x202008,\n");
        sb.append("\t            0x1c80: 0x200008,\n");
        sb.append("\t            0x1d80: 0x0,\n");
        sb.append("\t            0x1e80: 0x10000000,\n");
        sb.append("\t            0x1f80: 0x10002008\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x100000,\n");
        sb.append("\t            0x10: 0x2000401,\n");
        sb.append("\t            0x20: 0x400,\n");
        sb.append("\t            0x30: 0x100401,\n");
        sb.append("\t            0x40: 0x2100401,\n");
        sb.append("\t            0x50: 0x0,\n");
        sb.append("\t            0x60: 0x1,\n");
        sb.append("\t            0x70: 0x2100001,\n");
        sb.append("\t            0x80: 0x2000400,\n");
        sb.append("\t            0x90: 0x100001,\n");
        sb.append("\t            0xa0: 0x2000001,\n");
        sb.append("\t            0xb0: 0x2100400,\n");
        sb.append("\t            0xc0: 0x2100000,\n");
        sb.append("\t            0xd0: 0x401,\n");
        sb.append("\t            0xe0: 0x100400,\n");
        sb.append("\t            0xf0: 0x2000000,\n");
        sb.append("\t            0x8: 0x2100001,\n");
        sb.append("\t            0x18: 0x0,\n");
        sb.append("\t            0x28: 0x2000401,\n");
        sb.append("\t            0x38: 0x2100400,\n");
        sb.append("\t            0x48: 0x100000,\n");
        sb.append("\t            0x58: 0x2000001,\n");
        sb.append("\t            0x68: 0x2000000,\n");
        sb.append("\t            0x78: 0x401,\n");
        sb.append("\t            0x88: 0x100401,\n");
        sb.append("\t            0x98: 0x2000400,\n");
        sb.append("\t            0xa8: 0x2100000,\n");
        sb.append("\t            0xb8: 0x100001,\n");
        sb.append("\t            0xc8: 0x400,\n");
        sb.append("\t            0xd8: 0x2100401,\n");
        sb.append("\t            0xe8: 0x1,\n");
        sb.append("\t            0xf8: 0x100400,\n");
        sb.append("\t            0x100: 0x2000000,\n");
        sb.append("\t            0x110: 0x100000,\n");
        sb.append("\t            0x120: 0x2000401,\n");
        sb.append("\t            0x130: 0x2100001,\n");
        sb.append("\t            0x140: 0x100001,\n");
        sb.append("\t            0x150: 0x2000400,\n");
        sb.append("\t            0x160: 0x2100400,\n");
        sb.append("\t            0x170: 0x100401,\n");
        sb.append("\t            0x180: 0x401,\n");
        sb.append("\t            0x190: 0x2100401,\n");
        sb.append("\t            0x1a0: 0x100400,\n");
        sb.append("\t            0x1b0: 0x1,\n");
        sb.append("\t            0x1c0: 0x0,\n");
        sb.append("\t            0x1d0: 0x2100000,\n");
        sb.append("\t            0x1e0: 0x2000001,\n");
        sb.append("\t            0x1f0: 0x400,\n");
        sb.append("\t            0x108: 0x100400,\n");
        sb.append("\t            0x118: 0x2000401,\n");
        sb.append("\t            0x128: 0x2100001,\n");
        sb.append("\t            0x138: 0x1,\n");
        sb.append("\t            0x148: 0x2000000,\n");
        sb.append("\t            0x158: 0x100000,\n");
        sb.append("\t            0x168: 0x401,\n");
        sb.append("\t            0x178: 0x2100400,\n");
        sb.append("\t            0x188: 0x2000001,\n");
        sb.append("\t            0x198: 0x2100000,\n");
        sb.append("\t            0x1a8: 0x0,\n");
        sb.append("\t            0x1b8: 0x2100401,\n");
        sb.append("\t            0x1c8: 0x100401,\n");
        sb.append("\t            0x1d8: 0x400,\n");
        sb.append("\t            0x1e8: 0x2000400,\n");
        sb.append("\t            0x1f8: 0x100001\n");
        sb.append("\t        },\n");
        sb.append("\t        {\n");
        sb.append("\t            0x0: 0x8000820,\n");
        sb.append("\t            0x1: 0x20000,\n");
        sb.append("\t            0x2: 0x8000000,\n");
        sb.append("\t            0x3: 0x20,\n");
        sb.append("\t            0x4: 0x20020,\n");
        sb.append("\t            0x5: 0x8020820,\n");
        sb.append("\t            0x6: 0x8020800,\n");
        sb.append("\t            0x7: 0x800,\n");
        sb.append("\t            0x8: 0x8020000,\n");
        sb.append("\t            0x9: 0x8000800,\n");
        sb.append("\t            0xa: 0x20800,\n");
        sb.append("\t            0xb: 0x8020020,\n");
        sb.append("\t            0xc: 0x820,\n");
        sb.append("\t            0xd: 0x0,\n");
        sb.append("\t            0xe: 0x8000020,\n");
        sb.append("\t            0xf: 0x20820,\n");
        sb.append("\t            0x80000000: 0x800,\n");
        sb.append("\t            0x80000001: 0x8020820,\n");
        sb.append("\t            0x80000002: 0x8000820,\n");
        sb.append("\t            0x80000003: 0x8000000,\n");
        sb.append("\t            0x80000004: 0x8020000,\n");
        sb.append("\t            0x80000005: 0x20800,\n");
        sb.append("\t            0x80000006: 0x20820,\n");
        sb.append("\t            0x80000007: 0x20,\n");
        sb.append("\t            0x80000008: 0x8000020,\n");
        sb.append("\t            0x80000009: 0x820,\n");
        sb.append("\t            0x8000000a: 0x20020,\n");
        sb.append("\t            0x8000000b: 0x8020800,\n");
        sb.append("\t            0x8000000c: 0x0,\n");
        sb.append("\t            0x8000000d: 0x8020020,\n");
        sb.append("\t            0x8000000e: 0x8000800,\n");
        sb.append("\t            0x8000000f: 0x20000,\n");
        sb.append("\t            0x10: 0x20820,\n");
        sb.append("\t            0x11: 0x8020800,\n");
        sb.append("\t            0x12: 0x20,\n");
        sb.append("\t            0x13: 0x800,\n");
        sb.append("\t            0x14: 0x8000800,\n");
        sb.append("\t            0x15: 0x8000020,\n");
        sb.append("\t            0x16: 0x8020020,\n");
        sb.append("\t            0x17: 0x20000,\n");
        sb.append("\t            0x18: 0x0,\n");
        sb.append("\t            0x19: 0x20020,\n");
        sb.append("\t            0x1a: 0x8020000,\n");
        sb.append("\t            0x1b: 0x8000820,\n");
        sb.append("\t            0x1c: 0x8020820,\n");
        sb.append("\t            0x1d: 0x20800,\n");
        sb.append("\t            0x1e: 0x820,\n");
        sb.append("\t            0x1f: 0x8000000,\n");
        sb.append("\t            0x80000010: 0x20000,\n");
        sb.append("\t            0x80000011: 0x800,\n");
        sb.append("\t            0x80000012: 0x8020020,\n");
        sb.append("\t            0x80000013: 0x20820,\n");
        sb.append("\t            0x80000014: 0x20,\n");
        sb.append("\t            0x80000015: 0x8020000,\n");
        sb.append("\t            0x80000016: 0x8000000,\n");
        sb.append("\t            0x80000017: 0x8000820,\n");
        sb.append("\t            0x80000018: 0x8020820,\n");
        sb.append("\t            0x80000019: 0x8000020,\n");
        sb.append("\t            0x8000001a: 0x8000800,\n");
        sb.append("\t            0x8000001b: 0x0,\n");
        sb.append("\t            0x8000001c: 0x20800,\n");
        sb.append("\t            0x8000001d: 0x820,\n");
        sb.append("\t            0x8000001e: 0x20020,\n");
        sb.append("\t            0x8000001f: 0x8020800\n");
        sb.append("\t        }\n");
        sb.append("\t    ];\n");
        sb.append("\n");
        sb.append("\t    // Masks that select the SBOX input\n");
        sb.append("\t    var SBOX_MASK = [\n");
        sb.append("\t        0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n");
        sb.append("\t        0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n");
        sb.append("\t    ];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * DES block cipher algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var DES = C_algo.DES = BlockCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var key = this._key;\n");
        sb.append("\t            var keyWords = key.words;\n");
        sb.append("\n");
        sb.append("\t            // Select 56 bits according to PC1\n");
        sb.append("\t            var keyBits = [];\n");
        sb.append("\t            for (var i = 0; i < 56; i++) {\n");
        sb.append("\t                var keyBitPos = PC1[i] - 1;\n");
        sb.append("\t                keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Assemble 16 subkeys\n");
        sb.append("\t            var subKeys = this._subKeys = [];\n");
        sb.append("\t            for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n");
        sb.append("\t                // Create subkey\n");
        sb.append("\t                var subKey = subKeys[nSubKey] = [];\n");
        sb.append("\n");
        sb.append("\t                // Shortcut\n");
        sb.append("\t                var bitShift = BIT_SHIFTS[nSubKey];\n");
        sb.append("\n");
        sb.append("\t                // Select 48 bits according to PC2\n");
        sb.append("\t                for (var i = 0; i < 24; i++) {\n");
        sb.append("\t                    // Select from the left 28 key bits\n");
        sb.append("\t                    subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n");
        sb.append("\n");
        sb.append("\t                    // Select from the right 28 key bits\n");
        sb.append("\t                    subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n");
        sb.append("\t                }\n");
        sb.append("\n");
        sb.append("\t                // Since each subkey is applied to an expanded 32-bit input,\n");
        sb.append("\t                // the subkey can be broken into 8 values scaled to 32-bits,\n");
        sb.append("\t                // which allows the key to be used without expansion\n");
        sb.append("\t                subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n");
        sb.append("\t                for (var i = 1; i < 7; i++) {\n");
        sb.append("\t                    subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n");
        sb.append("\t                }\n");
        sb.append("\t                subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Compute inverse subkeys\n");
        sb.append("\t            var invSubKeys = this._invSubKeys = [];\n");
        sb.append("\t            for (var i = 0; i < 16; i++) {\n");
        sb.append("\t                invSubKeys[i] = subKeys[15 - i];\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        encryptBlock: function (M, offset) {\n");
        sb.append("\t            this._doCryptBlock(M, offset, this._subKeys);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        decryptBlock: function (M, offset) {\n");
        sb.append("\t            this._doCryptBlock(M, offset, this._invSubKeys);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doCryptBlock: function (M, offset, subKeys) {\n");
        sb.append("\t            // Get input\n");
        sb.append("\t            this._lBlock = M[offset];\n");
        sb.append("\t            this._rBlock = M[offset + 1];\n");
        sb.append("\n");
        sb.append("\t            // Initial permutation\n");
        sb.append("\t            exchangeLR.call(this, 4,  0x0f0f0f0f);\n");
        sb.append("\t            exchangeLR.call(this, 16, 0x0000ffff);\n");
        sb.append("\t            exchangeRL.call(this, 2,  0x33333333);\n");
        sb.append("\t            exchangeRL.call(this, 8,  0x00ff00ff);\n");
        sb.append("\t            exchangeLR.call(this, 1,  0x55555555);\n");
        sb.append("\n");
        sb.append("\t            // Rounds\n");
        sb.append("\t            for (var round = 0; round < 16; round++) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var subKey = subKeys[round];\n");
        sb.append("\t                var lBlock = this._lBlock;\n");
        sb.append("\t                var rBlock = this._rBlock;\n");
        sb.append("\n");
        sb.append("\t                // Feistel function\n");
        sb.append("\t                var f = 0;\n");
        sb.append("\t                for (var i = 0; i < 8; i++) {\n");
        sb.append("\t                    f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n");
        sb.append("\t                }\n");
        sb.append("\t                this._lBlock = rBlock;\n");
        sb.append("\t                this._rBlock = lBlock ^ f;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Undo swap from last round\n");
        sb.append("\t            var t = this._lBlock;\n");
        sb.append("\t            this._lBlock = this._rBlock;\n");
        sb.append("\t            this._rBlock = t;\n");
        sb.append("\n");
        sb.append("\t            // Final permutation\n");
        sb.append("\t            exchangeLR.call(this, 1,  0x55555555);\n");
        sb.append("\t            exchangeRL.call(this, 8,  0x00ff00ff);\n");
        sb.append("\t            exchangeRL.call(this, 2,  0x33333333);\n");
        sb.append("\t            exchangeLR.call(this, 16, 0x0000ffff);\n");
        sb.append("\t            exchangeLR.call(this, 4,  0x0f0f0f0f);\n");
        sb.append("\n");
        sb.append("\t            // Set output\n");
        sb.append("\t            M[offset] = this._lBlock;\n");
        sb.append("\t            M[offset + 1] = this._rBlock;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        keySize: 64/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 64/32,\n");
        sb.append("\n");
        sb.append("\t        blockSize: 64/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    // Swap bits across the left and right words\n");
        sb.append("\t    function exchangeLR(offset, mask) {\n");
        sb.append("\t        var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n");
        sb.append("\t        this._rBlock ^= t;\n");
        sb.append("\t        this._lBlock ^= t << offset;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    function exchangeRL(offset, mask) {\n");
        sb.append("\t        var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n");
        sb.append("\t        this._lBlock ^= t;\n");
        sb.append("\t        this._rBlock ^= t << offset;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.DES = BlockCipher._createHelper(DES);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Triple-DES block cipher algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var key = this._key;\n");
        sb.append("\t            var keyWords = key.words;\n");
        sb.append("\t            // Make sure the key length is valid (64, 128 or >= 192 bit)\n");
        sb.append("\t            if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n");
        sb.append("\t                throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Extend the key according to the keying options defined in 3DES standard\n");
        sb.append("\t            var key1 = keyWords.slice(0, 2);\n");
        sb.append("\t            var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n");
        sb.append("\t            var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n");
        sb.append("\n");
        sb.append("\t            // Create DES instances\n");
        sb.append("\t            this._des1 = DES.createEncryptor(WordArray.create(key1));\n");
        sb.append("\t            this._des2 = DES.createEncryptor(WordArray.create(key2));\n");
        sb.append("\t            this._des3 = DES.createEncryptor(WordArray.create(key3));\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        encryptBlock: function (M, offset) {\n");
        sb.append("\t            this._des1.encryptBlock(M, offset);\n");
        sb.append("\t            this._des2.decryptBlock(M, offset);\n");
        sb.append("\t            this._des3.encryptBlock(M, offset);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        decryptBlock: function (M, offset) {\n");
        sb.append("\t            this._des3.decryptBlock(M, offset);\n");
        sb.append("\t            this._des2.encryptBlock(M, offset);\n");
        sb.append("\t            this._des1.decryptBlock(M, offset);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        keySize: 192/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 64/32,\n");
        sb.append("\n");
        sb.append("\t        blockSize: 64/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.TripleDES = BlockCipher._createHelper(TripleDES);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var StreamCipher = C_lib.StreamCipher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * RC4 stream cipher algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var RC4 = C_algo.RC4 = StreamCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var key = this._key;\n");
        sb.append("\t            var keyWords = key.words;\n");
        sb.append("\t            var keySigBytes = key.sigBytes;\n");
        sb.append("\n");
        sb.append("\t            // Init sbox\n");
        sb.append("\t            var S = this._S = [];\n");
        sb.append("\t            for (var i = 0; i < 256; i++) {\n");
        sb.append("\t                S[i] = i;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Key setup\n");
        sb.append("\t            for (var i = 0, j = 0; i < 256; i++) {\n");
        sb.append("\t                var keyByteIndex = i % keySigBytes;\n");
        sb.append("\t                var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n");
        sb.append("\n");
        sb.append("\t                j = (j + S[i] + keyByte) % 256;\n");
        sb.append("\n");
        sb.append("\t                // Swap\n");
        sb.append("\t                var t = S[i];\n");
        sb.append("\t                S[i] = S[j];\n");
        sb.append("\t                S[j] = t;\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Counters\n");
        sb.append("\t            this._i = this._j = 0;\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            M[offset] ^= generateKeystreamWord.call(this);\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        keySize: 256/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 0\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    function generateKeystreamWord() {\n");
        sb.append("\t        // Shortcuts\n");
        sb.append("\t        var S = this._S;\n");
        sb.append("\t        var i = this._i;\n");
        sb.append("\t        var j = this._j;\n");
        sb.append("\n");
        sb.append("\t        // Generate keystream word\n");
        sb.append("\t        var keystreamWord = 0;\n");
        sb.append("\t        for (var n = 0; n < 4; n++) {\n");
        sb.append("\t            i = (i + 1) % 256;\n");
        sb.append("\t            j = (j + S[i]) % 256;\n");
        sb.append("\n");
        sb.append("\t            // Swap\n");
        sb.append("\t            var t = S[i];\n");
        sb.append("\t            S[i] = S[j];\n");
        sb.append("\t            S[j] = t;\n");
        sb.append("\n");
        sb.append("\t            keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Update counters\n");
        sb.append("\t        this._i = i;\n");
        sb.append("\t        this._j = j;\n");
        sb.append("\n");
        sb.append("\t        return keystreamWord;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.RC4 = StreamCipher._createHelper(RC4);\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Modified RC4 stream cipher algorithm.\n");
        sb.append("\t     */\n");
        sb.append("\t    var RC4Drop = C_algo.RC4Drop = RC4.extend({\n");
        sb.append("\t        /**\n");
        sb.append("\t         * Configuration options.\n");
        sb.append("\t         *\n");
        sb.append("\t         * @property {number} drop The number of keystream words to drop. Default 192\n");
        sb.append("\t         */\n");
        sb.append("\t        cfg: RC4.cfg.extend({\n");
        sb.append("\t            drop: 192\n");
        sb.append("\t        }),\n");
        sb.append("\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            RC4._doReset.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Drop\n");
        sb.append("\t            for (var i = this.cfg.drop; i > 0; i--) {\n");
        sb.append("\t                generateKeystreamWord.call(this);\n");
        sb.append("\t            }\n");
        sb.append("\t        }\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var StreamCipher = C_lib.StreamCipher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Reusable objects\n");
        sb.append("\t    var S  = [];\n");
        sb.append("\t    var C_ = [];\n");
        sb.append("\t    var G  = [];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Rabbit stream cipher algorithm\n");
        sb.append("\t     */\n");
        sb.append("\t    var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var K = this._key.words;\n");
        sb.append("\t            var iv = this.cfg.iv;\n");
        sb.append("\n");
        sb.append("\t            // Swap endian\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                K[i] = (((K[i] << 8)  | (K[i] >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                       (((K[i] << 24) | (K[i] >>> 8))  & 0xff00ff00);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Generate initial state values\n");
        sb.append("\t            var X = this._X = [\n");
        sb.append("\t                K[0], (K[3] << 16) | (K[2] >>> 16),\n");
        sb.append("\t                K[1], (K[0] << 16) | (K[3] >>> 16),\n");
        sb.append("\t                K[2], (K[1] << 16) | (K[0] >>> 16),\n");
        sb.append("\t                K[3], (K[2] << 16) | (K[1] >>> 16)\n");
        sb.append("\t            ];\n");
        sb.append("\n");
        sb.append("\t            // Generate initial counter values\n");
        sb.append("\t            var C = this._C = [\n");
        sb.append("\t                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n");
        sb.append("\t                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n");
        sb.append("\t                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n");
        sb.append("\t                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n");
        sb.append("\t            ];\n");
        sb.append("\n");
        sb.append("\t            // Carry bit\n");
        sb.append("\t            this._b = 0;\n");
        sb.append("\n");
        sb.append("\t            // Iterate the system four times\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                nextState.call(this);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Modify the counters\n");
        sb.append("\t            for (var i = 0; i < 8; i++) {\n");
        sb.append("\t                C[i] ^= X[(i + 4) & 7];\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // IV setup\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var IV = iv.words;\n");
        sb.append("\t                var IV_0 = IV[0];\n");
        sb.append("\t                var IV_1 = IV[1];\n");
        sb.append("\n");
        sb.append("\t                // Generate four subvectors\n");
        sb.append("\t                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n");
        sb.append("\t                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n");
        sb.append("\t                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n");
        sb.append("\t                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);\n");
        sb.append("\n");
        sb.append("\t                // Modify counter values\n");
        sb.append("\t                C[0] ^= i0;\n");
        sb.append("\t                C[1] ^= i1;\n");
        sb.append("\t                C[2] ^= i2;\n");
        sb.append("\t                C[3] ^= i3;\n");
        sb.append("\t                C[4] ^= i0;\n");
        sb.append("\t                C[5] ^= i1;\n");
        sb.append("\t                C[6] ^= i2;\n");
        sb.append("\t                C[7] ^= i3;\n");
        sb.append("\n");
        sb.append("\t                // Iterate the system four times\n");
        sb.append("\t                for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                    nextState.call(this);\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var X = this._X;\n");
        sb.append("\n");
        sb.append("\t            // Iterate the system\n");
        sb.append("\t            nextState.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Generate four keystream words\n");
        sb.append("\t            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n");
        sb.append("\t            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n");
        sb.append("\t            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n");
        sb.append("\t            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n");
        sb.append("\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                // Swap endian\n");
        sb.append("\t                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);\n");
        sb.append("\n");
        sb.append("\t                // Encrypt\n");
        sb.append("\t                M[offset + i] ^= S[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 128/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 64/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    function nextState() {\n");
        sb.append("\t        // Shortcuts\n");
        sb.append("\t        var X = this._X;\n");
        sb.append("\t        var C = this._C;\n");
        sb.append("\n");
        sb.append("\t        // Save old counter values\n");
        sb.append("\t        for (var i = 0; i < 8; i++) {\n");
        sb.append("\t            C_[i] = C[i];\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Calculate new counter values\n");
        sb.append("\t        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n");
        sb.append("\t        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n");
        sb.append("\n");
        sb.append("\t        // Calculate the g-values\n");
        sb.append("\t        for (var i = 0; i < 8; i++) {\n");
        sb.append("\t            var gx = X[i] + C[i];\n");
        sb.append("\n");
        sb.append("\t            // Construct high and low argument for squaring\n");
        sb.append("\t            var ga = gx & 0xffff;\n");
        sb.append("\t            var gb = gx >>> 16;\n");
        sb.append("\n");
        sb.append("\t            // Calculate high and low result of squaring\n");
        sb.append("\t            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n");
        sb.append("\t            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n");
        sb.append("\n");
        sb.append("\t            // High XOR low\n");
        sb.append("\t            G[i] = gh ^ gl;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Calculate new state values\n");
        sb.append("\t        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n");
        sb.append("\t        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;\n");
        sb.append("\t        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n");
        sb.append("\t        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;\n");
        sb.append("\t        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n");
        sb.append("\t        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;\n");
        sb.append("\t        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n");
        sb.append("\t        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.Rabbit = StreamCipher._createHelper(Rabbit);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\t(function () {\n");
        sb.append("\t    // Shortcuts\n");
        sb.append("\t    var C = CryptoJS;\n");
        sb.append("\t    var C_lib = C.lib;\n");
        sb.append("\t    var StreamCipher = C_lib.StreamCipher;\n");
        sb.append("\t    var C_algo = C.algo;\n");
        sb.append("\n");
        sb.append("\t    // Reusable objects\n");
        sb.append("\t    var S  = [];\n");
        sb.append("\t    var C_ = [];\n");
        sb.append("\t    var G  = [];\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Rabbit stream cipher algorithm.\n");
        sb.append("\t     *\n");
        sb.append("\t     * This is a legacy version that neglected to convert the key to little-endian.\n");
        sb.append("\t     * This error doesn't affect the cipher's security,\n");
        sb.append("\t     * but it does affect its compatibility with other implementations.\n");
        sb.append("\t     */\n");
        sb.append("\t    var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n");
        sb.append("\t        _doReset: function () {\n");
        sb.append("\t            // Shortcuts\n");
        sb.append("\t            var K = this._key.words;\n");
        sb.append("\t            var iv = this.cfg.iv;\n");
        sb.append("\n");
        sb.append("\t            // Generate initial state values\n");
        sb.append("\t            var X = this._X = [\n");
        sb.append("\t                K[0], (K[3] << 16) | (K[2] >>> 16),\n");
        sb.append("\t                K[1], (K[0] << 16) | (K[3] >>> 16),\n");
        sb.append("\t                K[2], (K[1] << 16) | (K[0] >>> 16),\n");
        sb.append("\t                K[3], (K[2] << 16) | (K[1] >>> 16)\n");
        sb.append("\t            ];\n");
        sb.append("\n");
        sb.append("\t            // Generate initial counter values\n");
        sb.append("\t            var C = this._C = [\n");
        sb.append("\t                (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n");
        sb.append("\t                (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n");
        sb.append("\t                (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n");
        sb.append("\t                (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n");
        sb.append("\t            ];\n");
        sb.append("\n");
        sb.append("\t            // Carry bit\n");
        sb.append("\t            this._b = 0;\n");
        sb.append("\n");
        sb.append("\t            // Iterate the system four times\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                nextState.call(this);\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // Modify the counters\n");
        sb.append("\t            for (var i = 0; i < 8; i++) {\n");
        sb.append("\t                C[i] ^= X[(i + 4) & 7];\n");
        sb.append("\t            }\n");
        sb.append("\n");
        sb.append("\t            // IV setup\n");
        sb.append("\t            if (iv) {\n");
        sb.append("\t                // Shortcuts\n");
        sb.append("\t                var IV = iv.words;\n");
        sb.append("\t                var IV_0 = IV[0];\n");
        sb.append("\t                var IV_1 = IV[1];\n");
        sb.append("\n");
        sb.append("\t                // Generate four subvectors\n");
        sb.append("\t                var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n");
        sb.append("\t                var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n");
        sb.append("\t                var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n");
        sb.append("\t                var i3 = (i2 << 16)  | (i0 & 0x0000ffff);\n");
        sb.append("\n");
        sb.append("\t                // Modify counter values\n");
        sb.append("\t                C[0] ^= i0;\n");
        sb.append("\t                C[1] ^= i1;\n");
        sb.append("\t                C[2] ^= i2;\n");
        sb.append("\t                C[3] ^= i3;\n");
        sb.append("\t                C[4] ^= i0;\n");
        sb.append("\t                C[5] ^= i1;\n");
        sb.append("\t                C[6] ^= i2;\n");
        sb.append("\t                C[7] ^= i3;\n");
        sb.append("\n");
        sb.append("\t                // Iterate the system four times\n");
        sb.append("\t                for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                    nextState.call(this);\n");
        sb.append("\t                }\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        _doProcessBlock: function (M, offset) {\n");
        sb.append("\t            // Shortcut\n");
        sb.append("\t            var X = this._X;\n");
        sb.append("\n");
        sb.append("\t            // Iterate the system\n");
        sb.append("\t            nextState.call(this);\n");
        sb.append("\n");
        sb.append("\t            // Generate four keystream words\n");
        sb.append("\t            S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n");
        sb.append("\t            S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n");
        sb.append("\t            S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n");
        sb.append("\t            S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n");
        sb.append("\n");
        sb.append("\t            for (var i = 0; i < 4; i++) {\n");
        sb.append("\t                // Swap endian\n");
        sb.append("\t                S[i] = (((S[i] << 8)  | (S[i] >>> 24)) & 0x00ff00ff) |\n");
        sb.append("\t                       (((S[i] << 24) | (S[i] >>> 8))  & 0xff00ff00);\n");
        sb.append("\n");
        sb.append("\t                // Encrypt\n");
        sb.append("\t                M[offset + i] ^= S[i];\n");
        sb.append("\t            }\n");
        sb.append("\t        },\n");
        sb.append("\n");
        sb.append("\t        blockSize: 128/32,\n");
        sb.append("\n");
        sb.append("\t        ivSize: 64/32\n");
        sb.append("\t    });\n");
        sb.append("\n");
        sb.append("\t    function nextState() {\n");
        sb.append("\t        // Shortcuts\n");
        sb.append("\t        var X = this._X;\n");
        sb.append("\t        var C = this._C;\n");
        sb.append("\n");
        sb.append("\t        // Save old counter values\n");
        sb.append("\t        for (var i = 0; i < 8; i++) {\n");
        sb.append("\t            C_[i] = C[i];\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Calculate new counter values\n");
        sb.append("\t        C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n");
        sb.append("\t        C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n");
        sb.append("\t        this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n");
        sb.append("\n");
        sb.append("\t        // Calculate the g-values\n");
        sb.append("\t        for (var i = 0; i < 8; i++) {\n");
        sb.append("\t            var gx = X[i] + C[i];\n");
        sb.append("\n");
        sb.append("\t            // Construct high and low argument for squaring\n");
        sb.append("\t            var ga = gx & 0xffff;\n");
        sb.append("\t            var gb = gx >>> 16;\n");
        sb.append("\n");
        sb.append("\t            // Calculate high and low result of squaring\n");
        sb.append("\t            var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n");
        sb.append("\t            var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n");
        sb.append("\n");
        sb.append("\t            // High XOR low\n");
        sb.append("\t            G[i] = gh ^ gl;\n");
        sb.append("\t        }\n");
        sb.append("\n");
        sb.append("\t        // Calculate new state values\n");
        sb.append("\t        X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n");
        sb.append("\t        X[1] = (G[1] + ((G[0] << 8)  | (G[0] >>> 24)) + G[7]) | 0;\n");
        sb.append("\t        X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n");
        sb.append("\t        X[3] = (G[3] + ((G[2] << 8)  | (G[2] >>> 24)) + G[1]) | 0;\n");
        sb.append("\t        X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n");
        sb.append("\t        X[5] = (G[5] + ((G[4] << 8)  | (G[4] >>> 24)) + G[3]) | 0;\n");
        sb.append("\t        X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n");
        sb.append("\t        X[7] = (G[7] + ((G[6] << 8)  | (G[6] >>> 24)) + G[5]) | 0;\n");
        sb.append("\t    }\n");
        sb.append("\n");
        sb.append("\t    /**\n");
        sb.append("\t     * Shortcut functions to the cipher's object interface.\n");
        sb.append("\t     *\n");
        sb.append("\t     * @example\n");
        sb.append("\t     *\n");
        sb.append("\t     *     var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n");
        sb.append("\t     *     var plaintext  = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n");
        sb.append("\t     */\n");
        sb.append("\t    C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n");
        sb.append("\t}());\n");
        sb.append("\n");
        sb.append("\n");
        sb.append("\treturn CryptoJS;\n");
        sb.append("\n");
        sb.append("}));");
        content = sb.toString();
    }
}
