2005
10.31

Here’s a very simple wasy to generate a sha1 hash. You can run gensha1.exe like this:

[rafael@salamandra tmp]$ mono gensha1.exe rafael
generating sha1 for:rafael
2D-8D-59-6A-0B-97-56-9F-92-26-A8-C3-3E-D9-C6-DB-C8-D8-81-20
[rafael@salamandra tmp]$

and the source code looks like this:

using System;
using System.Security.Cryptography;

public class GenSha1 {
        public static string GenHash(string str) {
                byte[] bt = System.Text.Encoding.ASCII.GetBytes(str);
                SHA1 sha1 = new SHA1CryptoServiceProvider();
                return( BitConverter.ToString(sha1.ComputeHash(bt)) );
        }
        public static void Main(string [] args ) {
                string verb = args[0];
                Console.WriteLine("generating sha1 for:{0}",verb);
                Console.WriteLine(GenHash(verb));
                Environment.Exit(0);
        }
}
2005
10.31

Testing jaws….

This is just a test of the emergency broadcast system!