How to make file password protect using c#
How to make file password protect using c# , after download the image , while opening the image should ask password to open
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Gokhul VarmanRank #1,505 · 1.1K reputationPosted Aug 8, 2017, 6:31 AM EDT
Manikandan MurugesanRank #300 · 8.4K reputationPosted Aug 8, 2017, 7:26 AM EDT
Refer the following Link : https://www.codeproject.com/Articles/696528/Csharp-Password-Protected-File
The simplest way, would be to use a Zip File.
As taken form this post by Cheeso using DotNetZip:
using (var zip = new ZipFile()) { zip.Password= "VerySecret!!"; zip.AddFile("test.txt"); zip.Save("Archive.zip"); }This results in 2 steps.
Mukil VendhanRank #2,971 · 486 reputationPosted Aug 8, 2017, 8:19 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Aug 8, 2017, 8:44 AM EDT