using System;
using System.Text;
using System.Security.Cryptography;
class MainClass
{
public static void Main(string[] args)
{
HashAlgorithm hashAlg = new SHA1Managed();
using (hashAlg)
{
byte[] pwordData = Encoding.Default.GetBytes("password");
byte[] hash = hashAlg.ComputeHash(pwordData);
Console.WriteLine(BitConverter.ToString(hash));
}
}
}
|