Breaker

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(“”)

merturk

One thought on “Php vs C#

Leave a Reply

Your email address will not be published. Required fields are marked *