1

Php vs C#

SHA1 hash calculation in C#

public static string CalculateSHA1(string text, Encoding enc)
{
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 =
new SHA1CryptoServiceProvider();
string hash = BitConverter.ToString(
cryptoTransformSHA1.ComputeHash(buffer)).Replace(“-”, “”);

return hash;
}

SHA1 hash calculation in Php

sha1(“”)

Related posts:

  1. TurkishDecimalFormat
  2. EJB3 sample demo with Ajax
  3. A trojan horse
  1. Anonymous says:

    Just what i was looking for! thanks!