C# SHA1散列算法
/// <summary>
        /// C# SHA1散列算法
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static string EncryptToSHA1(string str)
        {
            byte[] cleanBytes = Encoding.Default.GetBytes(str);
            byte[] hashedBytes = System.Security.Cryptography.SHA1.Create().ComputeHash(cleanBytes);
            return BitConverter.ToString(hashedBytes).Replace("-", "");
        }

  

相关文章:

  • 2021-08-06
  • 2022-01-28
  • 2022-01-22
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-12-04
猜你喜欢
  • 2021-06-29
  • 2021-10-13
  • 2021-09-29
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-03-07
相关资源
相似解决方案