从网上找到的一种加密代码: var enstr ="abcdefg"; var strRes = Encoding.Default.GetBytes(enstr); HashAlgorithm iSha = new SHA1CryptoServiceProvider(); strRes = iSha.ComputeHash(strRes); var enText = new StringBuilder(); foreach (byte iByte in strRes) { enText…
项目中用到js MD5加密和后台java MD5加密,刚开始加密后两个不一致,网上找了好久终于找到一个啦,记下来: md5.js /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other co…