I have to implement encryption and decryption in MVC 3.
Requirement is , First user will upload file,folder etc. then it will be displayed on screen. Now user can select the file or folder to encrypt or decrypt with a key (password).
How this functionality can be implemented? Any suggestion or help?
Code is important, but it's a small part of the overall process.
Then from the view just pass the Id of the file to be encrypted/decrypted (assuming the file is saved on the database/disk you'll have to identify the path on the server based on the ID or load it from database) and the password.
Please click 'Mark as Answer' if my reply has assisted you
walia_jagwin...
Member
240 Points
173 Posts
Need Suggestion and help?
Jul 18, 2011 05:23 AM|LINK
Hi all,
I have to implement encryption and decryption in MVC 3.
Requirement is , First user will upload file,folder etc. then it will be displayed on screen. Now user can select the file or folder to encrypt or decrypt with a key (password).
How this functionality can be implemented? Any suggestion or help?
-- Jagz W
ignatandrei
All-Star
135142 Points
21676 Posts
Moderator
MVP
Re: Need Suggestion and help?
Jul 18, 2011 05:44 AM|LINK
raduenuca
All-Star
24675 Points
4250 Posts
Re: Need Suggestion and help?
Jul 18, 2011 05:51 AM|LINK
You should implement a static class that performs the encryption/decryption first:
http://support.microsoft.com/kb/307010
http://msdn.microsoft.com/en-us/library/system.io.file.encrypt.aspx
http://www.ehow.com/how_7313554_encrypt-file-c_.html
Then from the view just pass the Id of the file to be encrypted/decrypted (assuming the file is saved on the database/disk you'll have to identify the path on the server based on the ID or load it from database) and the password.
Radu Enuca | Blog