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); } 

http://dotnetzip.herobo.com/dnzhelp/index.html


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -