private static byte[] GetEncryptionKey(string password)
{
byte[] key = new byte[] { 0xF2, 0xA1, 0x03, 0x9D, 0x63, 0x87, 0x35, 0x5E };
byte[] iv = new byte[] { 0xAB, 0xB8, 0x94, 0x7E, 0x1D, 0xE5, 0xD1, 0x33 };
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Key = key;
des.IV = iv;
if (password.Length < 8)
password = password.PadRight(8, '*');
byte[] data = ASCIIEncoding.ASCII.GetBytes(password);
byte[] encData = des.CreateEncryptor().TransformFinalBlock(data, 0, data.Length);
byte[] result = new byte[ArraySize(8)];
Array.Copy(encData, 0, result, 0, keyLength);
return result;
}