How to encrypt/decrypt a file



I have a web application that allows users to download their data to a
file on their computer. Then at a later time they can upload the file
back to the web server and continue working. The file is in XML
format. I want to find a simple way to encrypt the file before I
stream it down to their computer. Then at a later time I will need to
decrypt it when they re-upload it. The user's do not have any type of
account on the server so I am assuming that I will need to use the same
key information for every file that I encrypt. I have done quite a bit
of reading on MSDN about cryptography and still can not make heads or
tails of it. All of the examples that I have seen seem to generate the
key on the fly every time. I need a solution where I store the key
somewhere on the server so that I can use it every time I need to
encrypt a file.

Can anyone point me to a simple example of how to encrypt a file using
a key stored somewhere on the server?

Thanks,
Corey

.



Relevant Pages

  • ASP.NET Process Identity???
    ... files from the server using System.IO namespace's functions. ... the directories where users upload and download files are protected ... whit NTFS permssions that allows access only for Administrators. ...
    (microsoft.public.dotnet.security)
  • Re: edit asp site?
    ... I can download the ... change and upload if that will work but do not ... Definately use a text editor ... Set your system up as a web server, ...
    (alt.html)
  • Re: A cryptography solution for a client/server winforms app
    ... good idea if you want to learn crypto. ... you control both the client and server, you don't even need to use a ... code the client to ignore certificate trust errors. ... encrypt the memory stream. ...
    (microsoft.public.dotnet.security)
  • Re: Edit document via web
    ... You would need some sort of third party software installed on the client to ... download the file, save it somewhere to make changes and then upload it back ... the software would have to know how to upload ... the document back to the server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Problems uploading newsgroup posts to Tera News
    ... I'm having problems uploading any newsgroups posts to Tera News. ... used this to restore the ability to download since Windows Mail ... I have not been able to upload any posts there again. ... Server: 'free.teranews.com', Protocol: NNTP, Server Response: '403 Remote ...
    (microsoft.public.windows.vista.mail)