返回首页

大家好,

lab9.3工作 - 文件加密了这个工作
lab9.4文件解密的工作 - 得到了这个工作

在这本书的第一线,看起来像这样:

// Read the command-line parameters

             //example c:\myfile\abc.txt The file has some data to be encrypted

              string inputFilePath = args[0];

 

              //example c:\myfile\abcEncrpt.txt This file will be used to save the encrypted format of the input file

              string OutputFilePath = args[1];

 

              //provide any password

              string filePassword = args[2];

当我试图编译,我得到这个错误:

{C}
我还可以改变它像这样:

string filePassword;

            Console.WriteLine("Enter a Password to decrypy the file");

            filePassword = Console.ReadLine();

所以我改变了代码以下,并得到它的工作:

{体C3}
在这个改进,我可以hyave做类似:

{的C4}
所以这里是我的问题应该怎么做它使用ARGS被定义:

{C5的}
我在MSDN上发现了一个很酷的例子,但没有奏效。和我想这是因为类似的原因。这里是链接:



或者只是谷歌Rfc2898DeriveBytes MSDN。

我觉得我仿佛失去了一些东西,即使我有两个实验室工作,有乐趣修改代码,使密码被硬编码。

有这方面的反馈将不胜感激

感谢在前进。

回答

评论会员: 时间:2