src/Foundation/Net/Gimela.Net.Http/Authentication/DigestAuthentication.cs
/// <summary>
/// Gets the Md5 hash bin hex2.
/// </summary>
/// <param name="toBeHashed">To be hashed.</param>
/// <returns></returns>
Gets the Md5 hash bin hex2.
Gets the Md5 hash bin hex2 .
public static string GetMD5HashBinHex2(string toBeHashed)
    {
      MD5 md5 = new MD5CryptoServiceProvider();
      byte[] result = md5.ComputeHash(Encoding.Default.GetBytes(toBeHashed));
      StringBuilder sb = new StringBuilder();
      foreach (byte b in result)
        sb.Append(b.ToString("x2"));
      return sb.ToString();
    }
public static string GetMD5HashBinHex2 ( string toBeHashed ) { MD5 md5 = new MD5CryptoServiceProvider ( ) ; byte [ ] result = md5 . ComputeHash ( Encoding . Default . GetBytes ( toBeHashed ) ) ; StringBuilder sb = new StringBuilder ( ) ; foreach ( byte b in result ) sb . Append ( b . ToString ( " " ) ) ; return sb . ToString ( ) ; }
Gets the Md5 hash bin hex2.
Gets the Md5 hash bin hex2 .
None
toBeHashed
string
To be hashed.
To be hashed .