T
Thomas Dybdahl Ahle
Hi, I've got some DES encrypted data, for which I know the password.
The problem is that I have to generate an 8byte key from the password.
I use python-crypto-2.0.1.
I also know, that the C# way to do the decryption is:
PasswordDeriveBytes bytes1 = new
PasswordDeriveBytes("passwordString", null);
byte[] array1 = new byte[8];
byte[] array2 = bytes1.CryptDeriveKey("DES", "MD5", 0, array1);
DESCryptoServiceProvider provider1 = new DESCryptoServiceProvider();
FileStream fs = new FileStream("fileNameString", FileMode.Open,
FileAccess.Read); CryptoStream cs = new CryptoStream(fs,
provider1.CreateEncryptor(array2, array1), CryptoStreamMode.Read);
Anybody know how to do this in python?
The problem is that I have to generate an 8byte key from the password.
I use python-crypto-2.0.1.
I also know, that the C# way to do the decryption is:
PasswordDeriveBytes bytes1 = new
PasswordDeriveBytes("passwordString", null);
byte[] array1 = new byte[8];
byte[] array2 = bytes1.CryptDeriveKey("DES", "MD5", 0, array1);
DESCryptoServiceProvider provider1 = new DESCryptoServiceProvider();
FileStream fs = new FileStream("fileNameString", FileMode.Open,
FileAccess.Read); CryptoStream cs = new CryptoStream(fs,
provider1.CreateEncryptor(array2, array1), CryptoStreamMode.Read);
Anybody know how to do this in python?