Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I want to protect my file with a password that can't open (when someone not no password) but able to modify through programming even it is password protected.

Any suggestion how to do it or any good link to study.

Remember one thing, all thing be done through c# coding.

Thanks a lot in advance :)
Posted
Comments
[no name] 21-May-14 16:27pm    
The only way I can think of right off that you would be able to do this is you would need to use something like zip to zip up your file using a password and then unzip it when you need it.
binadi007 21-May-14 23:21pm    
no.... i don't wanna use zip file, because i can edit again and again my file through programming. So I just want to make it changable but when someone is opening that file than it ask password
ZurdoDev 21-May-14 16:44pm    
I would suggest encrypting instead.
binadi007 21-May-14 23:22pm    
encryption and decryption is I think difficult than giving password to the file whose content is changing time to time

1 solution

You can't, it's that simple. NTFS doesn't support it and you can't add the support by writing entirely C# code.

Adding this support is FAR more work than you're thinking of. I hope you know how to write and debug Windows Kernel code because it's going to take a driver to do it and at least one application to manage the password table and assigning and recovering passwords.

Forget this garbage. It's useless and doesn't add any security over and above properly setup security using the built-in functions.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-May-14 1:56am    
Quite agree, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900