Sha256: 040a2918bec8cb8ba0a6303fa3c1bbfd899bc8644643e8ac493e3c08a0c09097

Contents?: true

Size: 1.78 KB

Versions: 35

Compression:

Stored size: 1.78 KB

Contents

;(function (root, factory, undef) {
	if (typeof exports === "object") {
		// CommonJS
		module.exports = exports = factory(require("./core"), require("./cipher-core"));
	}
	else if (typeof define === "function" && define.amd) {
		// AMD
		define(["./core", "./cipher-core"], factory);
	}
	else {
		// Global (browser)
		factory(root.CryptoJS);
	}
}(this, function (CryptoJS) {

	(function (undefined) {
	    // Shortcuts
	    var C = CryptoJS;
	    var C_lib = C.lib;
	    var CipherParams = C_lib.CipherParams;
	    var C_enc = C.enc;
	    var Hex = C_enc.Hex;
	    var C_format = C.format;

	    var HexFormatter = C_format.Hex = {
	        /**
	         * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
	         *
	         * @param {CipherParams} cipherParams The cipher params object.
	         *
	         * @return {string} The hexadecimally encoded string.
	         *
	         * @static
	         *
	         * @example
	         *
	         *     var hexString = CryptoJS.format.Hex.stringify(cipherParams);
	         */
	        stringify: function (cipherParams) {
	            return cipherParams.ciphertext.toString(Hex);
	        },

	        /**
	         * Converts a hexadecimally encoded ciphertext string to a cipher params object.
	         *
	         * @param {string} input The hexadecimally encoded string.
	         *
	         * @return {CipherParams} The cipher params object.
	         *
	         * @static
	         *
	         * @example
	         *
	         *     var cipherParams = CryptoJS.format.Hex.parse(hexString);
	         */
	        parse: function (input) {
	            var ciphertext = Hex.parse(input);
	            return CipherParams.create({ ciphertext: ciphertext });
	        }
	    };
	}());


	return CryptoJS.format.Hex;

}));

Version data entries

35 entries across 35 versions & 4 rubygems

Version Path
rapid_stack-0.2.0 templates/frontend/node_modules/crypto-js/format-hex.js
rapid_stack-0.1.1 templates/FrontEnd/node_modules/crypto-js/format-hex.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/crypto-js/format-hex.js
appmap-0.72.2 ./node_modules/crypto-js/format-hex.js
appmap-0.72.1 ./node_modules/crypto-js/format-hex.js
appmap-0.72.0 ./node_modules/crypto-js/format-hex.js
appmap-0.71.0 ./node_modules/crypto-js/format-hex.js
appmap-0.70.2 ./node_modules/crypto-js/format-hex.js
appmap-0.70.1 ./node_modules/crypto-js/format-hex.js
appmap-0.70.0 ./node_modules/crypto-js/format-hex.js
appmap-0.69.0 ./node_modules/crypto-js/format-hex.js
appmap-0.68.2 ./node_modules/crypto-js/format-hex.js
appmap-0.68.1 ./node_modules/crypto-js/format-hex.js
appmap-0.68.0 ./node_modules/crypto-js/format-hex.js
appmap-0.67.1 ./node_modules/crypto-js/format-hex.js
appmap-0.67.0 ./node_modules/crypto-js/format-hex.js
appmap-0.66.2 ./node_modules/crypto-js/format-hex.js
appmap-0.66.1 ./node_modules/crypto-js/format-hex.js
appmap-0.66.0 ./node_modules/crypto-js/format-hex.js
appmap-0.65.1 ./node_modules/crypto-js/format-hex.js