Need Suggestion and help?http://forums.asp.net/t/1700827.aspx/1?Need+Suggestion+and+help+Mon, 18 Jul 2011 05:51:07 -040017008274511363http://forums.asp.net/p/1700827/4511363.aspx/1?Need+Suggestion+and+help+Need Suggestion and help? <p>Hi all,</p> <p>I have to implement encryption and decryption in MVC 3.</p> <p></p> <p>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).</p> <p></p> <p>How this functionality can be implemented? Any suggestion or help?</p> 2011-07-18T05:23:51-04:004511396http://forums.asp.net/p/1700827/4511396.aspx/1?Re+Need+Suggestion+and+help+Re: Need Suggestion and help? Save file on hard.When encrypt, read file contents, encrypt and save on disk. When decrypt, make the same. 2011-07-18T05:44:42-04:004511405http://forums.asp.net/p/1700827/4511405.aspx/1?Re+Need+Suggestion+and+help+Re: Need Suggestion and help? <p>You should implement a static class&nbsp;that performs the encryption/decryption first:</p> <p><a href="http://support.microsoft.com/kb/307010">http://support.microsoft.com/kb/307010</a></p> <p><a href="http://msdn.microsoft.com/en-us/library/system.io.file.encrypt.aspx">http://msdn.microsoft.com/en-us/library/system.io.file.encrypt.aspx</a></p> <p><a href="http://www.ehow.com/how_7313554_encrypt-file-c_.html">http://www.ehow.com/how_7313554_encrypt-file-c_.html</a></p> <p>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.</p> <p>&nbsp;</p> <p>&nbsp;</p> 2011-07-18T05:51:07-04:00