dim rawKeyBytes() as Byte = System.Text.Encoding.UTF8.GetBytes(tcKey) dim sha as new SHA1CryptoServiceProvider() dim hash() as Byte = sha.ComputeHash(rawKeyBytes)This will give you 20 bytes of key material in the hash byte array (or 16 if you use MD5) and you can simply extract the leftmost 8 for use with DES. I am not familiar with VB.NET so I don't know what the proper way would be of slicing 8 bytes out of the array (although .NET's Array.Copy() should work).