encryption - Decrypting a Password Protected Zipped File using DotNetZip C# -
i m trying extract zipped file through dotnetzip
. file encrypted
password , needs either reset or removed. used extractall
method received exception:
badpasswordexception unhandled, password didnot match.
my code below:
using (ionic.zip.zipfile zip = ionic.zip.zipfile.read(source_file)) { zip.password = "1234"; zip.extractall(dest_path, ionic.zip.extractexistingfileaction.overwritesilently); }
any appreciated.
according documentation use
using (zipfile zip = zipfile.read(existingzipfile)) { zipentry e = zip["taxinformation-2008.xls"]; e.extractwithpassword(basedirectory, password); }
Comments
Post a Comment