我已使用下面的以下代码将zip文件转换为enc文件,但无法正常工作,请帮助我解决此问题
此外,如果有任何第三方工具可将zip转换为enc文件,请提及其详细信息。
预先感谢
try
{
string startPath = "";
string path = @"F:\Augustin\UpTest\Upload\";
DirectoryInfo objdirinfovikramfile = new DirectoryInfo(path);
if (objdirinfovikramfile.Exists)
{
errorcheck = "a";
foreach (DirectoryInfo objdirenmvikramfile in objdirinfovikramfile.GetDirectories())
{
string checkvikramfile = "";
checkvikramfile = objdirenmvikramfile.Name;
startPath = path + checkvikramfile + "\\";
string zipPath = path + checkvikramfile + ".zip";
string sub = zipPath.Split('\\').Last();
Boolean decrypt = false;
FileManager obj = new FileManager();
Int64 secure_count = 0;
while (secure_count <= 3 && !decrypt)
{
decrypt = obj_viki1.Decryption(zipPath, zipPath.Replace(".zip", ".enc"), "dietcoke1"); //DLL Function
secure_count++;
}
if (secure_count > 3 && !decrypt)
{
File.Copy(zipPath, path + "\\FAILED\\" + zipPath.Split('\\').Last(),true );
File.Copy(zipPath, path + "\\FAILED\\" + zipPath.Split('\\').Last(), true);
}
else
{
File.Copy(zipPath, path + "\\SUCCESS\\" + zipPath.Split('\\').Last(), true);
}
}
}
}
catch (Exception ex)
{
Error_log("FileProcess Enc: " + errorcheck + " ", ex.ToString());
Application.Exit();
}