/// <summary>
 /// SHA512_加密
 /// </summary>
 public static string SHA512_Encrypt(string sourceString, bool isLower = false)
 {
     if (string.IsNullOrEmpty(sourceString))
     {
         return("");
     }
     return(HashHelper.GetHashedString(HashType.SHA512, sourceString, isLower));
 }
 /// <summary>
 /// get MD5 hashed string
 /// </summary>
 /// <param name="sourceString">原字符串</param>
 /// <param name="isLower">加密后的字符串是否为小写</param>
 /// <returns>加密后字符串</returns>
 public static string MD5(string sourceString, bool isLower = false)
 {
     if (string.IsNullOrEmpty(sourceString))
     {
         return("");
     }
     return(HashHelper.GetHashedString(HashType.MD5, sourceString, isLower));
 }
Example #3
0
 /// <summary>
 /// get SHA512 hashed string
 /// </summary>
 public static string SHA512(string sourceString, bool isLower = false)
 {
     return(string.IsNullOrEmpty(sourceString) ? string.Empty : HashHelper.GetHashedString(HashType.SHA512, sourceString, isLower));
 }