Re: ASPX login page and xml
From: EMW (SomeOne_at_MicroSoftdotCom)
Date: 06/15/04
- Next message: marinov: "Re: Checkboxlist inside Repeater - doesn't fire click event for Checkboxlist"
- Previous message: Steve C. Orr [MVP, MCSD]: "Re: start/stop services programatically"
- In reply to: Ken Cox [Microsoft MVP]: "Re: ASPX login page and xml"
- Messages sorted by: [ date ] [ thread ]
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
> >
> >
>
- Next message: marinov: "Re: Checkboxlist inside Repeater - doesn't fire click event for Checkboxlist"
- Previous message: Steve C. Orr [MVP, MCSD]: "Re: start/stop services programatically"
- In reply to: Ken Cox [Microsoft MVP]: "Re: ASPX login page and xml"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|