SHA1 CheckSum

Niladri.Biswas
Posted by Niladri.Biswas under C# category on | Points: 40 | Views : 1692
public static string SHA1CheckSum(string Input,Encoding enc)
{
byte[] buffer = enc.GetBytes(Input);

SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();

string Hash = Convert.ToBase64String((SHA1.ComputeHash(buffer)));

return Hash;
}

Comments or Responses

Login to post response