Csharp/C Sharp by API/System.Security.Cryptography/SHA1Managed
Версия от 15:31, 26 мая 2010; (обсуждение)
new SHA1Managed()
using System;
using System.Text;
using System.Security.Cryptography;
class MainClass {
public static void Main(string[] args) {
HashAlgorithm hashAlg = null;
hashAlg = new SHA1Managed();
using (hashAlg) {
byte[] pwordData = Encoding.Default.GetBytes(args[1]);
byte[] hash = hashAlg.ruputeHash(pwordData);
Console.WriteLine(BitConverter.ToString(hash));
}
}
}