Re: ASPX login page and xml

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: EMW (SomeOne_at_MicroSoftdotCom)
Date: 06/15/04


Date: Tue, 15 Jun 2004 23:09:20 +0200

Thank you!!!

rg,
eric.

"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> schreef in bericht
news:eMYK3nxUEHA.3076@TK2MSFTNGP10.phx.gbl...
> This article discusses ways of encrypting and decrypting an XML file:
>
>
http://www.fawcette.com/vsm/2003_03/magazine/features/vandersypen/default_pf.aspx
>
>
> Dim filename As String = _
> "c:\SymmetricExample.xml"
>
> Dim FileWriter As FileStream = New _
> FileStream(filename,FileMode.Create)
>
> Dim CryptoWriter As CryptoStream = _
> New CryptoStream(FileWriter, _
> cryptoprovider.CreateEncryptor( _
> key,iv), CryptoStreamMode.Write)
>
> This code creates a stream for decrypting a file:
>
> Dim filename As String = _
> "c:\SymmetricExample.xml"
>
> Dim FileReader As FileStream = New _
> FileStream(filename, FileMode.Open)
>
> Dim CryptoReader As CryptoStream = _
> New CryptoStream(FileReader, _
> cryptoprovider.CreateDecryptor( _
> key,iv), CryptoStreamMode.Read)
>
> Now that you have a stream for encrypting and decrypting data, you can
feed
> it into an XmlTextReader object for decrypting or an XmlTextWriter object
> for encrypting:
>
> Dim XmlDoc As XmlDocument
>
> Dim XmlReader As XmlTextReader = New _
> XmlTextReader(CryptoReader)
>
> XmlDoc = New XmlDocument()
>
> XmlDoc.Load(XmlReader)
>
>
> "EMW" <SomeOne@MicroSoftdotCom> wrote in message
> news:40cf580a$0$41746$5fc3050@dreader2.news.tiscali.nl...
> > Hi,
> >
> > I am creating a login part on my page and I wanted to store the username
> > and
> > password info in a xml file at the server.
> > But to make sure nobody but my program can read the xml file, I was
> > thinking
> > of using some kind of encryption.
> >
> > How can I do this?
> > Is there any known and easy way to do this?
> >
> > rg,
> > Eric
> >
> >
>



Relevant Pages

  • Re: Encryption/Decryption
    ... For encrypting / decrypting multiple files at once, ... >>> successfully, on the desktop, without Windows CE involved. ... The next> thing>>> to do is to build the "init user" app for Windows CE, and run it, and> see>>> if it succeeds. ...
    (microsoft.public.windowsce.app.development)
  • Re: Vigenere Cipher II - how to use files
    ... > Its my program for decrypting and encrypting text. ... so you'll need to check your documentation. ... Same answer as to the the first 'BTW' question. ...
    (comp.lang.c)
  • Re: encryption/decryption
    ... 1.desktop for encrypting (encrypting and decrypting is working perfectly ... fine in win32 desktop application using VC++ samples) ... but when i try to decrypt the encoded file from the pocket pc using the same ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* fun
    ... >> decrypting with public key. ... > cryptography providers. ... Encrypting with the private key is equivalent to signing. ...
    (microsoft.public.platformsdk.security)
  • Re: encryption/decryption
    ... at pocket pc "client_decrypt" is not decrypting properly.. ... -- "eRiva Systems" - Where Technology Meets Life, ... > 1.desktop for encrypting > a.inituser ...
    (microsoft.public.windowsce.embedded.vc)