This article is a mirror article of machine translation, please click here to jump to the original article.

View: 20468|Reply: 0

[Source] . Net's MD516-bit encryption for uppercase and lowercase letters

[Copy link]
Posted on 9/8/2015 8:23:28 PM | | |
  1. /**/
  2.         /// <summary>
  3.         /// MD5 16位加密 加密后密码为大写
  4.         /// </summary>
  5.         /// <param name="ConvertString"></param>
  6.         /// <returns></returns>
  7.         public static string GetMd5Str(string ConvertString)
  8.         {
  9.             MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
  10.             string t2 = BitConverter.ToString(md5.ComputeHash(UTF8Encoding.Default.GetBytes(ConvertString)), 4, 8);
  11.             t2 = t2.Replace("-", "");
  12.             return t2;
  13.         }

  14.         /**/
  15.         /// <summary>
  16.         /// MD5 16位加密 加密后密码为小写
  17.         /// </summary>
  18.         /// <param name="ConvertString"></param>
  19.         /// <returns></returns>
  20.         public static string GetMd5Str(string ConvertString)
  21.         {
  22.             MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
  23.             string t2 = BitConverter.ToString(md5.ComputeHash(UTF8Encoding.Default.GetBytes(ConvertString)), 4, 8);
  24.             t2 = t2.Replace("-", "");
  25.             t2 = t2.ToLower();
  26.             return t2;
  27.         }
Copy code
String mingwen1 = "ENTER"; Plain text 1
mingwen1 = mingwen1.toUpperCase(); Capitalization
mingwen1 = mingwen1.toLowerCase(); lowercase
String mingwen2 = "eNTER"; Plain text 2
mingwen2 = mingwen2.toUpperCase(); Capitalization
mingwen2 = mingwen2.toLowerCase(); lowercase
String mingwen3 = "enTER"; Plain text 3
mingwen3 = mingwen3.toUpperCase(); Capitalization
mingwen3 = mingwen3.toLowerCase(); lowercase
String mingwen4 = "EnTER"; Plain text 4
mingwen4 = mingwen4.toUpperCase(); Capitalization
mingwen4 = mingwen4.toLowerCase(); lowercase





Previous:Ruijie has always been determined what is going on
Next:iis7 posts mvc HTTP error 403.14 - Forbidden web server is configured not to list this directory...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com