精华内容
下载资源
问答
  • md5加密解密js文件.zip

    2020-05-07 15:41:36
    运用js来使用md5加密和解密库!运用js来使用md5加密和解密库!运用js来使用md5加密和解密库!运用js来使用md5加密和解密库!
  • md5加密解密js文件

    2018-08-21 11:42:14
    用于md5加密解密,详细使用方法链接:https://blog.csdn.net/qq_35713752/article/details/81904958
  • js md5加密 无法md5解密

    万次阅读 2018-08-21 11:41:48
    微信小程序开发交流qq...在util目录添加md5.js文件 : 下载地址:https://download.csdn.net/download/qq_35713752/10617174; 目录结构如图: 在util.js里面: /** * MD5加密 */ var MD5Encode = require(...

    微信小程序开发交流qq群   173683895

       承接微信小程序开发。扫码加微信。

     

    在util目录添加md5.js文件 :  下载地址:https://download.csdn.net/download/qq_35713752/10617174

    目录结构如图:

    在util.js里面:

    /**
     * MD5加密
     */
    var MD5Encode = require("MD5Encode.js");
    function doMD5Encode(toEncode) {
      return MD5Encode.hexMD5(toEncode);
    }
    module.exports = {
      doMD5Encode: doMD5Encode, //md5加密导出
    }

    使用方法:

    导入util文件:var util = require('../../../utils/util.js');

    使用函数示例:

    let _phone = util.doMD5Encode(wx.getStorageSync('phone'));
    console.log(_phone);

     

    展开全文
  • javascript url MD5加密解密,里面附带样例。 加密结果:?t=f&n=MTM0MDQ3NjMzMTEsNTgwLjAwLDU4LjAwLDU4MC4wMCwwMSwwMSwwMDA0LDE=&l=ea2dd4d6c1245e8f2a814181cbde34c1
  • CryptoJS.MD5 解密方法

    千次阅读 2019-10-08 18:55:33
    1.在断点的地方,方法名为:var md5Password = CryptoJS.MD5(password+"zol") + ' '; 2.点击跳进的方法, 直接调用CryptoJS.MD5开始的方法. 转载于:...

      1.在断点的地方, 方法名为:   var md5Password = CryptoJS.MD5(password+"zol") + ' ';

     

    2.点击跳进的方法,  直接调用CryptoJS.MD5 开始的方法.

    转载于:https://www.cnblogs.com/limi2019/articles/11069486.html

    展开全文
  • MD5客户端加密解密js

    2013-09-19 09:50:06
    web前台md5加密和解密js,欢迎下载
  • Javascriptmd5加密函数,根据提供的字符串生成对应的md5值.这个js md5()函数支持utf-8,并且配有使用实例。可以将js代码保存到md5.js中,在需要的时候调用。注意:md5的生成需要一系列函数,请不要改动以下代码,...

    Javascript的md5加密函数,根据提供的字符串生成对应的md5值.

    这个js md5()函数支持utf-8,并且配有使用实例。

    可以将js代码保存到md5.js中,在需要的时候调用。注意:md5的生成需要一系列函数,请不要改动以下代码,否则可能导致程序出错,或者无法获取到正确的md5值。

    为了保证代码的正确性,请下载附件md5.js (没有实例),而不要直接复制本页代码。

    /*

    * Javascript md5() 函数 用于生成字符串对应的md5值

    * 吴先成  www.51-n.com ohcc@163.com QQ:229256237

    * @param string string 原始字符串

    * @return string 加密后的32位md5字符串

    */

    function md5(string){

    function md5_RotateLeft(lValue, iShiftBits) {

    return (lValue<>>(32-iShiftBits));

    }

    function md5_AddUnsigned(lX,lY){

    var lX4,lY4,lX8,lY8,lResult;

    lX8 = (lX & 0x80000000);

    lY8 = (lY & 0x80000000);

    lX4 = (lX & 0x40000000);

    lY4 = (lY & 0x40000000);

    lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);

    if (lX4 & lY4) {

    return (lResult ^ 0x80000000 ^ lX8 ^ lY8);

    }

    if (lX4 | lY4) {

    if (lResult & 0x40000000) {

    return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);

    } else {

    return (lResult ^ 0x40000000 ^ lX8 ^ lY8);

    }

    } else {

    return (lResult ^ lX8 ^ lY8);

    }

    }

    function md5_F(x,y,z){

    return (x & y) | ((~x) & z);

    }

    function md5_G(x,y,z){

    return (x & z) | (y & (~z));

    }

    function md5_H(x,y,z){

    return (x ^ y ^ z);

    }

    function md5_I(x,y,z){

    return (y ^ (x | (~z)));

    }

    function md5_FF(a,b,c,d,x,s,ac){

    a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));

    return md5_AddUnsigned(md5_RotateLeft(a, s), b);

    };

    function md5_GG(a,b,c,d,x,s,ac){

    a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));

    return md5_AddUnsigned(md5_RotateLeft(a, s), b);

    };

    function md5_HH(a,b,c,d,x,s,ac){

    a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));

    return md5_AddUnsigned(md5_RotateLeft(a, s), b);

    };

    function md5_II(a,b,c,d,x,s,ac){

    a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));

    return md5_AddUnsigned(md5_RotateLeft(a, s), b);

    };

    function md5_ConvertToWordArray(string) {

    var lWordCount;

    var lMessageLength = string.length;

    var lNumberOfWords_temp1=lMessageLength + 8;

    var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;

    var lNumberOfWords = (lNumberOfWords_temp2+1)*16;

    var lWordArray=Array(lNumberOfWords-1);

    var lBytePosition = 0;

    var lByteCount = 0;

    while ( lByteCount < lMessageLength ) {

    lWordCount = (lByteCount-(lByteCount % 4))/4;

    lBytePosition = (lByteCount % 4)*8;

    lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<

    lByteCount++;

    }

    lWordCount = (lByteCount-(lByteCount % 4))/4;

    lBytePosition = (lByteCount % 4)*8;

    lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<

    lWordArray[lNumberOfWords-2] = lMessageLength<<3;

    lWordArray[lNumberOfWords-1] = lMessageLength>>>29;

    return lWordArray;

    };

    function md5_WordToHex(lValue){

    var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;

    for(lCount = 0;lCount<=3;lCount++){

    lByte = (lValue>>>(lCount*8)) & 255;

    WordToHexValue_temp = "0" + lByte.toString(16);

    WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);

    }

    return WordToHexValue;

    };

    function md5_Utf8Encode(string){

    string = string.replace(/\r\n/g,"\n");

    var utftext = "";

    for (var n = 0; n < string.length; n++) {

    var c = string.charCodeAt(n);

    if (c < 128) {

    utftext += String.fromCharCode(c);

    }else if((c > 127) && (c < 2048)) {

    utftext += String.fromCharCode((c >> 6) | 192);

    utftext += String.fromCharCode((c & 63) | 128);

    } else {

    utftext += String.fromCharCode((c >> 12) | 224);

    utftext += String.fromCharCode(((c >> 6) & 63) | 128);

    utftext += String.fromCharCode((c & 63) | 128);

    }

    }

    return utftext;

    };

    var x=Array();

    var k,AA,BB,CC,DD,a,b,c,d;

    var S11=7, S12=12, S13=17, S14=22;

    var S21=5, S22=9 , S23=14, S24=20;

    var S31=4, S32=11, S33=16, S34=23;

    var S41=6, S42=10, S43=15, S44=21;

    string = md5_Utf8Encode(string);

    x = md5_ConvertToWordArray(string);

    a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;

    for (k=0;k

    AA=a; BB=b; CC=c; DD=d;

    a=md5_FF(a,b,c,d,x[k+0], S11,0xD76AA478);

    d=md5_FF(d,a,b,c,x[k+1], S12,0xE8C7B756);

    c=md5_FF(c,d,a,b,x[k+2], S13,0x242070DB);

    b=md5_FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);

    a=md5_FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);

    d=md5_FF(d,a,b,c,x[k+5], S12,0x4787C62A);

    c=md5_FF(c,d,a,b,x[k+6], S13,0xA8304613);

    b=md5_FF(b,c,d,a,x[k+7], S14,0xFD469501);

    a=md5_FF(a,b,c,d,x[k+8], S11,0x698098D8);

    d=md5_FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);

    c=md5_FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);

    b=md5_FF(b,c,d,a,x[k+11],S14,0x895CD7BE);

    a=md5_FF(a,b,c,d,x[k+12],S11,0x6B901122);

    d=md5_FF(d,a,b,c,x[k+13],S12,0xFD987193);

    c=md5_FF(c,d,a,b,x[k+14],S13,0xA679438E);

    b=md5_FF(b,c,d,a,x[k+15],S14,0x49B40821);

    a=md5_GG(a,b,c,d,x[k+1], S21,0xF61E2562);

    d=md5_GG(d,a,b,c,x[k+6], S22,0xC040B340);

    c=md5_GG(c,d,a,b,x[k+11],S23,0x265E5A51);

    b=md5_GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);

    a=md5_GG(a,b,c,d,x[k+5], S21,0xD62F105D);

    d=md5_GG(d,a,b,c,x[k+10],S22,0x2441453);

    c=md5_GG(c,d,a,b,x[k+15],S23,0xD8A1E681);

    b=md5_GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);

    a=md5_GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);

    d=md5_GG(d,a,b,c,x[k+14],S22,0xC33707D6);

    c=md5_GG(c,d,a,b,x[k+3], S23,0xF4D50D87);

    b=md5_GG(b,c,d,a,x[k+8], S24,0x455A14ED);

    a=md5_GG(a,b,c,d,x[k+13],S21,0xA9E3E905);

    d=md5_GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);

    c=md5_GG(c,d,a,b,x[k+7], S23,0x676F02D9);

    b=md5_GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);

    a=md5_HH(a,b,c,d,x[k+5], S31,0xFFFA3942);

    d=md5_HH(d,a,b,c,x[k+8], S32,0x8771F681);

    c=md5_HH(c,d,a,b,x[k+11],S33,0x6D9D6122);

    b=md5_HH(b,c,d,a,x[k+14],S34,0xFDE5380C);

    a=md5_HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);

    d=md5_HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);

    c=md5_HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);

    b=md5_HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);

    a=md5_HH(a,b,c,d,x[k+13],S31,0x289B7EC6);

    d=md5_HH(d,a,b,c,x[k+0], S32,0xEAA127FA);

    c=md5_HH(c,d,a,b,x[k+3], S33,0xD4EF3085);

    b=md5_HH(b,c,d,a,x[k+6], S34,0x4881D05);

    a=md5_HH(a,b,c,d,x[k+9], S31,0xD9D4D039);

    d=md5_HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);

    c=md5_HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);

    b=md5_HH(b,c,d,a,x[k+2], S34,0xC4AC5665);

    a=md5_II(a,b,c,d,x[k+0], S41,0xF4292244);

    d=md5_II(d,a,b,c,x[k+7], S42,0x432AFF97);

    c=md5_II(c,d,a,b,x[k+14],S43,0xAB9423A7);

    b=md5_II(b,c,d,a,x[k+5], S44,0xFC93A039);

    a=md5_II(a,b,c,d,x[k+12],S41,0x655B59C3);

    d=md5_II(d,a,b,c,x[k+3], S42,0x8F0CCC92);

    c=md5_II(c,d,a,b,x[k+10],S43,0xFFEFF47D);

    b=md5_II(b,c,d,a,x[k+1], S44,0x85845DD1);

    a=md5_II(a,b,c,d,x[k+8], S41,0x6FA87E4F);

    d=md5_II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);

    c=md5_II(c,d,a,b,x[k+6], S43,0xA3014314);

    b=md5_II(b,c,d,a,x[k+13],S44,0x4E0811A1);

    a=md5_II(a,b,c,d,x[k+4], S41,0xF7537E82);

    d=md5_II(d,a,b,c,x[k+11],S42,0xBD3AF235);

    c=md5_II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);

    b=md5_II(b,c,d,a,x[k+9], S44,0xEB86D391);

    a=md5_AddUnsigned(a,AA);

    b=md5_AddUnsigned(b,BB);

    c=md5_AddUnsigned(c,CC);

    d=md5_AddUnsigned(d,DD);

    }

    return (md5_WordToHex(a)+md5_WordToHex(b)+md5_WordToHex(c)+md5_WordToHex(d)).toLowerCase();

    }

    //使用实例

    document.write(md5('www.51-n.com'));

    展开全文
  • MD5加密解密工具

    2012-10-30 09:37:20
    MD5加密解密工具
  • md5解密工具Md5Decrypt

    2012-10-21 03:35:09
    解密文件,一行一条数据,可以带其他参数。带参数的情况下,请使用密串定位来确定。...在破解过程中可以停止破解,下次继续破解时不更改待解密文件的路径就能继续破解。 如有问题请联系xmd5org@gmail.com
  • md5.js加密和base64加密解密 md5.js加密 /** * jQuery MD5 hash algorithm function * * <code> * Calculate the md5 hash of a String * String $.md5 ( String str ) * </code> ...

    md5.js加密和base64加密解密

    md5.js加密

    	/**
    	 * jQuery MD5 hash algorithm function
    	 * 
    	 * 	<code>
    	 * 		Calculate the md5 hash of a String 
    	 * 		String $.md5 ( String str )
    	 * 	</code>
    	 * 
    	 * Calculates the MD5 hash of str using the » RSA Data Security, Inc. MD5 Message-Digest Algorithm, and returns that hash. 
    	 * MD5 (Message-Digest algorithm 5) is a widely-used cryptographic hash function with a 128-bit hash value. MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of data. The generated hash is also non-reversable. Data cannot be retrieved from the message digest, the digest uniquely identifies the data.
    	 * MD5 was developed by Professor Ronald L. Rivest in 1994. Its 128 bit (16 byte) message digest makes it a faster implementation than SHA-1.
    	 * This script is used to process a variable length message into a fixed-length output of 128 bits using the MD5 algorithm. It is fully compatible with UTF-8 encoding. It is very useful when u want to transfer encrypted passwords over the internet. If you plan using UTF-8 encoding in your project don't forget to set the page encoding to UTF-8 (Content-Type meta tag). 
    	 * This function orginally get from the WebToolkit and rewrite for using as the jQuery plugin.
    	 * 
    	 * Example
    	 * 	Code
    	 * 		<code>
    	 * 			$.md5("I'm Persian."); 
    	 * 		</code>
    	 * 	Result
    	 * 		<code>
    	 * 			"b8c901d0f02223f9761016cfff9d68df"
    	 * 		</code>
    	 * 
    	 * @alias Muhammad Hussein Fattahizadeh < muhammad [AT] semnanweb [DOT] com >
    	 * @link http://www.semnanweb.com/jquery-plugin/md5.html
    	 * @see http://www.webtoolkit.info/
    	 * @license http://www.gnu.org/licenses/gpl.html [GNU General Public License]
    	 * @param {jQuery} {md5:function(string))
    	 * @return string
    	 */
    	(function($){
    		var rotateLeft = function(lValue, iShiftBits) {
    			return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
    		}
    		var addUnsigned = function(lX, lY) {
    			var lX4, lY4, lX8, lY8, lResult;
    			lX8 = (lX & 0x80000000);
    			lY8 = (lY & 0x80000000);
    			lX4 = (lX & 0x40000000);
    			lY4 = (lY & 0x40000000);
    			lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
    			if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
    			if (lX4 | lY4) {
    				if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
    				else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
    			} else {
    				return (lResult ^ lX8 ^ lY8);
    			}
    		}
    		var F = function(x, y, z) {
    			return (x & y) | ((~ x) & z);
    		}
    		var G = function(x, y, z) {
    			return (x & z) | (y & (~ z));
    		}
    		var H = function(x, y, z) {
    			return (x ^ y ^ z);
    		}
    		var I = function(x, y, z) {
    			return (y ^ (x | (~ z)));
    		}
    		var FF = function(a, b, c, d, x, s, ac) {
    			a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
    			return addUnsigned(rotateLeft(a, s), b);
    		};
    		var GG = function(a, b, c, d, x, s, ac) {
    			a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
    			return addUnsigned(rotateLeft(a, s), b);
    		};
    		var HH = function(a, b, c, d, x, s, ac) {
    			a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
    			return addUnsigned(rotateLeft(a, s), b);
    		};
    		var II = function(a, b, c, d, x, s, ac) {
    			a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
    			return addUnsigned(rotateLeft(a, s), b);
    		};
    		var convertToWordArray = function(string) {
    			var lWordCount;
    			var lMessageLength = string.length;
    			var lNumberOfWordsTempOne = lMessageLength + 8;
    			var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
    			var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
    			var lWordArray = Array(lNumberOfWords - 1);
    			var lBytePosition = 0;
    			var lByteCount = 0;
    			while (lByteCount < lMessageLength) {
    				lWordCount = (lByteCount - (lByteCount % 4)) / 4;
    				lBytePosition = (lByteCount % 4) * 8;
    				lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
    				lByteCount++;
    			}
    			lWordCount = (lByteCount - (lByteCount % 4)) / 4;
    			lBytePosition = (lByteCount % 4) * 8;
    			lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
    			lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
    			lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
    			return lWordArray;
    		};
    		var wordToHex = function(lValue) {
    			var WordToHexValue = "", WordToHexValueTemp = "", lByte, lCount;
    			for (lCount = 0; lCount <= 3; lCount++) {
    				lByte = (lValue >>> (lCount * 8)) & 255;
    				WordToHexValueTemp = "0" + lByte.toString(16);
    				WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
    			}
    			return WordToHexValue;
    		};
    		var uTF8Encode = function(string) {
    			string = string.replace(/\x0d\x0a/g, "\x0a");
    			var output = "";
    			for (var n = 0; n < string.length; n++) {
    				var c = string.charCodeAt(n);
    				if (c < 128) {
    					output += String.fromCharCode(c);
    				} else if ((c > 127) && (c < 2048)) {
    					output += String.fromCharCode((c >> 6) | 192);
    					output += String.fromCharCode((c & 63) | 128);
    				} else {
    					output += String.fromCharCode((c >> 12) | 224);
    					output += String.fromCharCode(((c >> 6) & 63) | 128);
    					output += String.fromCharCode((c & 63) | 128);
    				}
    			}
    			return output;
    		};
    		$.extend({
    			md5: function(string) {
    				var x = Array();
    				var k, AA, BB, CC, DD, a, b, c, d;
    				var S11=7, S12=12, S13=17, S14=22;
    				var S21=5, S22=9 , S23=14, S24=20;
    				var S31=4, S32=11, S33=16, S34=23;
    				var S41=6, S42=10, S43=15, S44=21;
    				string = uTF8Encode(string);
    				x = convertToWordArray(string);
    				a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
    				for (k = 0; k < x.length; k += 16) {
    					AA = a; BB = b; CC = c; DD = d;
    					a = FF(a, b, c, d, x[k+0],  S11, 0xD76AA478);
    					d = FF(d, a, b, c, x[k+1],  S12, 0xE8C7B756);
    					c = FF(c, d, a, b, x[k+2],  S13, 0x242070DB);
    					b = FF(b, c, d, a, x[k+3],  S14, 0xC1BDCEEE);
    					a = FF(a, b, c, d, x[k+4],  S11, 0xF57C0FAF);
    					d = FF(d, a, b, c, x[k+5],  S12, 0x4787C62A);
    					c = FF(c, d, a, b, x[k+6],  S13, 0xA8304613);
    					b = FF(b, c, d, a, x[k+7],  S14, 0xFD469501);
    					a = FF(a, b, c, d, x[k+8],  S11, 0x698098D8);
    					d = FF(d, a, b, c, x[k+9],  S12, 0x8B44F7AF);
    					c = FF(c, d, a, b, x[k+10], S13, 0xFFFF5BB1);
    					b = FF(b, c, d, a, x[k+11], S14, 0x895CD7BE);
    					a = FF(a, b, c, d, x[k+12], S11, 0x6B901122);
    					d = FF(d, a, b, c, x[k+13], S12, 0xFD987193);
    					c = FF(c, d, a, b, x[k+14], S13, 0xA679438E);
    					b = FF(b, c, d, a, x[k+15], S14, 0x49B40821);
    					a = GG(a, b, c, d, x[k+1],  S21, 0xF61E2562);
    					d = GG(d, a, b, c, x[k+6],  S22, 0xC040B340);
    					c = GG(c, d, a, b, x[k+11], S23, 0x265E5A51);
    					b = GG(b, c, d, a, x[k+0],  S24, 0xE9B6C7AA);
    					a = GG(a, b, c, d, x[k+5],  S21, 0xD62F105D);
    					d = GG(d, a, b, c, x[k+10], S22, 0x2441453);
    					c = GG(c, d, a, b, x[k+15], S23, 0xD8A1E681);
    					b = GG(b, c, d, a, x[k+4],  S24, 0xE7D3FBC8);
    					a = GG(a, b, c, d, x[k+9],  S21, 0x21E1CDE6);
    					d = GG(d, a, b, c, x[k+14], S22, 0xC33707D6);
    					c = GG(c, d, a, b, x[k+3],  S23, 0xF4D50D87);
    					b = GG(b, c, d, a, x[k+8],  S24, 0x455A14ED);
    					a = GG(a, b, c, d, x[k+13], S21, 0xA9E3E905);
    					d = GG(d, a, b, c, x[k+2],  S22, 0xFCEFA3F8);
    					c = GG(c, d, a, b, x[k+7],  S23, 0x676F02D9);
    					b = GG(b, c, d, a, x[k+12], S24, 0x8D2A4C8A);
    					a = HH(a, b, c, d, x[k+5],  S31, 0xFFFA3942);
    					d = HH(d, a, b, c, x[k+8],  S32, 0x8771F681);
    					c = HH(c, d, a, b, x[k+11], S33, 0x6D9D6122);
    					b = HH(b, c, d, a, x[k+14], S34, 0xFDE5380C);
    					a = HH(a, b, c, d, x[k+1],  S31, 0xA4BEEA44);
    					d = HH(d, a, b, c, x[k+4],  S32, 0x4BDECFA9);
    					c = HH(c, d, a, b, x[k+7],  S33, 0xF6BB4B60);
    					b = HH(b, c, d, a, x[k+10], S34, 0xBEBFBC70);
    					a = HH(a, b, c, d, x[k+13], S31, 0x289B7EC6);
    					d = HH(d, a, b, c, x[k+0],  S32, 0xEAA127FA);
    					c = HH(c, d, a, b, x[k+3],  S33, 0xD4EF3085);
    					b = HH(b, c, d, a, x[k+6],  S34, 0x4881D05);
    					a = HH(a, b, c, d, x[k+9],  S31, 0xD9D4D039);
    					d = HH(d, a, b, c, x[k+12], S32, 0xE6DB99E5);
    					c = HH(c, d, a, b, x[k+15], S33, 0x1FA27CF8);
    					b = HH(b, c, d, a, x[k+2],  S34, 0xC4AC5665);
    					a = II(a, b, c, d, x[k+0],  S41, 0xF4292244);
    					d = II(d, a, b, c, x[k+7],  S42, 0x432AFF97);
    					c = II(c, d, a, b, x[k+14], S43, 0xAB9423A7);
    					b = II(b, c, d, a, x[k+5],  S44, 0xFC93A039);
    					a = II(a, b, c, d, x[k+12], S41, 0x655B59C3);
    					d = II(d, a, b, c, x[k+3],  S42, 0x8F0CCC92);
    					c = II(c, d, a, b, x[k+10], S43, 0xFFEFF47D);
    					b = II(b, c, d, a, x[k+1],  S44, 0x85845DD1);
    					a = II(a, b, c, d, x[k+8],  S41, 0x6FA87E4F);
    					d = II(d, a, b, c, x[k+15], S42, 0xFE2CE6E0);
    					c = II(c, d, a, b, x[k+6],  S43, 0xA3014314);
    					b = II(b, c, d, a, x[k+13], S44, 0x4E0811A1);
    					a = II(a, b, c, d, x[k+4],  S41, 0xF7537E82);
    					d = II(d, a, b, c, x[k+11], S42, 0xBD3AF235);
    					c = II(c, d, a, b, x[k+2],  S43, 0x2AD7D2BB);
    					b = II(b, c, d, a, x[k+9],  S44, 0xEB86D391);
    					a = addUnsigned(a, AA);
    					b = addUnsigned(b, BB);
    					c = addUnsigned(c, CC);
    					d = addUnsigned(d, DD);
    				}
    				var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
    				return tempValue.toLowerCase();
    			}
    		});
    	})(jQuery);
    
    

    引入jquery

    直接上完整代码

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>md5.js加密</title>
    </head>
    <body>
        
    </body>
    <script src="../jquery-1.11.1.min.js"></script>
    <script src="./md5.js" type="text/javascript" charset="utf-8"></script>
    <script>
       console.log($.md5("csdn"));
    </script>
    </html>
    

    md5.js加密后的内容需要在站长工具中解密,js不能实现解密

    base64加密、解密

    base64.js

    /**
    *
    *  Base64 encode / decode
    *
    *  @author haitao.tu
    *  @date   2010-04-26
    *  @email  tuhaitao@foxmail.com
    *
    */
     
    function Base64() {
     
    	// private property
    	_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
     
    	// public method for encoding
    	this.encode = function (input) {
    		var output = "";
    		var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
    		var i = 0;
    		input = _utf8_encode(input);
    		while (i < input.length) {
    			chr1 = input.charCodeAt(i++);
    			chr2 = input.charCodeAt(i++);
    			chr3 = input.charCodeAt(i++);
    			enc1 = chr1 >> 2;
    			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    			enc4 = chr3 & 63;
    			if (isNaN(chr2)) {
    				enc3 = enc4 = 64;
    			} else if (isNaN(chr3)) {
    				enc4 = 64;
    			}
    			output = output +
    			_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +
    			_keyStr.charAt(enc3) + _keyStr.charAt(enc4);
    		}
    		return output;
    	}
     
    	// public method for decoding
    	this.decode = function (input) {
    		var output = "";
    		var chr1, chr2, chr3;
    		var enc1, enc2, enc3, enc4;
    		var i = 0;
    		input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
    		while (i < input.length) {
    			enc1 = _keyStr.indexOf(input.charAt(i++));
    			enc2 = _keyStr.indexOf(input.charAt(i++));
    			enc3 = _keyStr.indexOf(input.charAt(i++));
    			enc4 = _keyStr.indexOf(input.charAt(i++));
    			chr1 = (enc1 << 2) | (enc2 >> 4);
    			chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
    			chr3 = ((enc3 & 3) << 6) | enc4;
    			output = output + String.fromCharCode(chr1);
    			if (enc3 != 64) {
    				output = output + String.fromCharCode(chr2);
    			}
    			if (enc4 != 64) {
    				output = output + String.fromCharCode(chr3);
    			}
    		}
    		output = _utf8_decode(output);
    		return output;
    	}
     
    	// private method for UTF-8 encoding
    	_utf8_encode = function (string) {
    		string = string.replace(/\r\n/g,"\n");
    		var utftext = "";
    		for (var n = 0; n < string.length; n++) {
    			var c = string.charCodeAt(n);
    			if (c < 128) {
    				utftext += String.fromCharCode(c);
    			} else if((c > 127) && (c < 2048)) {
    				utftext += String.fromCharCode((c >> 6) | 192);
    				utftext += String.fromCharCode((c & 63) | 128);
    			} else {
    				utftext += String.fromCharCode((c >> 12) | 224);
    				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
    				utftext += String.fromCharCode((c & 63) | 128);
    			}
     
    		}
    		return utftext;
    	}
     
    	// private method for UTF-8 decoding
    	_utf8_decode = function (utftext) {
    		var string = "";
    		var i = 0;
    		var c = c1 = c2 = 0;
    		while ( i < utftext.length ) {
    			c = utftext.charCodeAt(i);
    			if (c < 128) {
    				string += String.fromCharCode(c);
    				i++;
    			} else if((c > 191) && (c < 224)) {
    				c2 = utftext.charCodeAt(i+1);
    				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
    				i += 2;
    			} else {
    				c2 = utftext.charCodeAt(i+1);
    				c3 = utftext.charCodeAt(i+2);
    				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
    				i += 3;
    			}
    		}
    		return string;
    	}
    }
    
    

    完整代码

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>base64</title>
    </head>
    <body>
        
    </body>
    <script src="./base64.js"></script>
    <script>
        // 用base64加密
        var base = new Base64();
        var obj = {name:"Chestnut",age:'18',gender:'女'}
        var str = base.encode(obj.gender); 
        console.log(str);
    
        // 解密
        str = base.decode(str);
        console.log(str);
    </script>
    </html>
    
    展开全文
  • 第一种:用npm安装md5工具 npm install md5 使用方法var md5 = require('MD5');console.log(md5('message')); 输出为:78e731027d8fd50ed642340b7c9a63b3第二种:用nodejs的底层CRYPTO 加密模块(md5) 使用require('...
  • 后端是自己写的php api框架,前后端分离,api数据传输想保密,虽然用上了https,但是数据还是可以被抓包看见的,心里不安,于是就想数据加密传输,那就要使用javascript和php通用的加解密方式了,js加密的数据可以...
  • md5-min.js文件下载。通过js给对应字段进行MD5加密解密的操作。
  • // base64加密开始 var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv"+ "wxyz0123456789+/" + "=... }
  • JSTools_AES_md5_Base64_Demo This JS tools used to ...由于项目需要必须采用JS端来对字符串进行MD5,AES,Base64等加密解密,所以搜集和测试了这些相关的方法实现,可以通过打开WebRoot/index.html页面来测试代码
  • MD5 JS实现加密

    千次阅读 2019-04-16 21:19:59
    MD5 消息摘要算法(英语:MD5 Message-Digest Algorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致。MD5由美国密码学家罗纳德·李维斯特...
  • 简单的MD5加密解密

    2017-08-31 12:30:03
    MD5加密
  • md5加密js文件

    2019-01-16 18:03:08
    MD5js加密文件,欢迎使用。
  • 本文实例为大家分享了.net core使用MD5加密解密字符串的具体代码,供大家参考,具体内容如下 /// /// 加密 /// /// 要加密的文本 /// 秘钥 /// <returns></returns> public static string Encrypt(string ...
  • MD5/SHA1/BASE64加密解密js文件,包含使用方法
  • AES使用java和js互相加解密及前端MD5加密,java后台加密前端js解密,或前端js加密,后端java解密
  • js md5加密插件

    2020-09-27 15:56:00
    在web前端js中使用md5加密,可以有效的保障信息在传向后端服务器过程中的安全,同时也可以减少后端二次md5加密计算资源的消耗。...这篇博文就来说一说,在web前端,如何使用原生js(javascript)对信息进行md5加密。
  • MD5.js,前端MD5加密

    2018-08-22 16:56:29
    在这里给大家介绍一种在前端JS中的MD5加密算法,但是现在有md5解密工具https://cmd5.la/user/login.php?req_url=/user/index.php。所以,在加密的时候要加暗文,或者加密两次等。 下面是vue的MD5引入例子 安装:...
  • 1.java-RSA加密解密 2.java-zip加密压缩 3.js数据加密MD5 SHA1 RSA 里面都有使用方法和jar包、js,
  • JS-MD5.rar

    2020-10-13 10:17:07
    js-md5加密,使用方法<!--引入md5.js--> <script src='/md5/md5.js' type='text/javascript'> <script type="text/javascript" charset="utf-8"> alert(md5('a')); </script>
  • http://wenshu.court.gov.cn/List/List?sorttype=1&conditions=searchWord+1+AJLX++%E6%A1%88%E4%BB%B6%E7%B1%BB%E5%9E%8B:%E5%88%91%E4 ...看了js 代码是md5加密 但是不知道如何破解,希望js 高手指教一下 谢谢!
  • Jquery Md5加密解密

    千次阅读 2015-09-15 11:31:00
    首先需要调用md5解析的js文件。(右击-目标另存为方式下载) http://files.cnblogs.com/files/colinliu/md5.js 加密方法参考: <script type="text/javascript"> var pwd = hex_md5($("#userpwd").val...
  • md5解密猜想

    2018-07-09 12:29:00
    md5解密猜想 一、总结 一句话总结:可以用有技巧性(常用密码,相关信息)的暴力破解。 二、md5解密猜想 1、暴力破解 其实md5也是由那些常用的字符串组组成的32位密文,所以可以把那些常用字符串(比如常用...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 16,259
精华内容 6,503
关键字:

md5js解密方法