How can I decrypt a file in C# which has been encrypted by des.exe?
问题 I have a file which has been encrypted by des.exe. A file can be encrypted and decrypted using the following commands: des -E -k "foo" sample.txt sample.txt.enc des -D -k "foo" sample.txt.enc sample.txt.dec I have attempted to decrypt using the following: public byte[] Decrypt(FileInfo file, string key) { byte[] keyAsBytes = LibDesPasswordConvertor.PasswordToKey(key); byte[] initializationVector = keyAsBytes; var cryptoProvider = new DESCryptoServiceProvider(); cryptoProvider.Mode =