PC Review


Reply
Thread Tools Rate Thread

Decrypt encrypted xml file on PPC

 
 
Dalli
Guest
Posts: n/a
 
      21st Dec 2004
Hello,

if I have an Xml-File on the "normal" PC, which is encrypted by the
following method:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'Encrypt the data set and write it to file.
Dim aXmlTextWriter As Xml.XmlTextWriter

aXmlTextWriter = New XmlTextWriter("myXML.xml", Encoding.UTF8)

Dim aUE As New UnicodeEncoding()
Dim key() As Byte = aUE.GetBytes("password")
Dim RMCrypto As RijndaelManaged = New RijndaelManaged()
Dim aCryptoStream As New CryptoStream(aXmlTextWriter.BaseStream, _
RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write)

ds.WriteXml(aCryptoStream)
aCryptoStream.Close()

'Clear the dataset so we can see that it is empty before
'we decrypt the encrypted file.
ds.Clear()
End Sub

See Source on
http://www.experts-exchange.com/Prog..._20598364.html

how could I decrypt this file on the Pocket PC? I need to open an encrypted
xml file on PPC, it also could be encrypted with a different method. I need
to load the xml file into a dataset.

Thanks for your help

Thomas



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QWxleCBZYWtobmluIFtNVlBd?=
Guest
Posts: n/a
 
      21st Dec 2004
Take a look at SDF which supports quite a few assymetrical algorithms - RSA,
MD5, SHA1 etc..

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com
www.opennetcf.org
My blog: http://blog.opennetcf.org/ayakhnin


"Dalli" wrote:

> Hello,
>
> if I have an Xml-File on the "normal" PC, which is encrypted by the
> following method:
>
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> 'Encrypt the data set and write it to file.
> Dim aXmlTextWriter As Xml.XmlTextWriter
>
> aXmlTextWriter = New XmlTextWriter("myXML.xml", Encoding.UTF8)
>
> Dim aUE As New UnicodeEncoding()
> Dim key() As Byte = aUE.GetBytes("password")
> Dim RMCrypto As RijndaelManaged = New RijndaelManaged()
> Dim aCryptoStream As New CryptoStream(aXmlTextWriter.BaseStream, _
> RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write)
>
> ds.WriteXml(aCryptoStream)
> aCryptoStream.Close()
>
> 'Clear the dataset so we can see that it is empty before
> 'we decrypt the encrypted file.
> ds.Clear()
> End Sub
>
> See Source on
> http://www.experts-exchange.com/Prog..._20598364.html
>
> how could I decrypt this file on the Pocket PC? I need to open an encrypted
> xml file on PPC, it also could be encrypted with a different method. I need
> to load the xml file into a dataset.
>
> Thanks for your help
>
> Thomas
>
>
>
>

 
Reply With Quote
 
Dalli
Guest
Posts: n/a
 
      21st Dec 2004
Are there examples how to encrypt / decrypt a whole file and read it with
the xmlreader?

Thomas

"Alex Yakhnin [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
news:CCB6A6C6-06F1-4F0F-AE68-(E-Mail Removed)...
> Take a look at SDF which supports quite a few assymetrical algorithms -

RSA,
> MD5, SHA1 etc..
>
> --
> Alex Yakhnin, .NET CF MVP
> www.intelliprog.com
> www.opennetcf.org
> My blog: http://blog.opennetcf.org/ayakhnin
>
>
> "Dalli" wrote:
>
> > Hello,
> >
> > if I have an Xml-File on the "normal" PC, which is encrypted by the
> > following method:
> >
> > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles Button1.Click
> > 'Encrypt the data set and write it to file.
> > Dim aXmlTextWriter As Xml.XmlTextWriter
> >
> > aXmlTextWriter = New XmlTextWriter("myXML.xml", Encoding.UTF8)
> >
> > Dim aUE As New UnicodeEncoding()
> > Dim key() As Byte = aUE.GetBytes("password")
> > Dim RMCrypto As RijndaelManaged = New RijndaelManaged()
> > Dim aCryptoStream As New CryptoStream(aXmlTextWriter.BaseStream,

_
> > RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write)
> >
> > ds.WriteXml(aCryptoStream)
> > aCryptoStream.Close()
> >
> > 'Clear the dataset so we can see that it is empty before
> > 'we decrypt the encrypted file.
> > ds.Clear()
> > End Sub
> >
> > See Source on
> >

http://www.experts-exchange.com/Prog..._20598364.html
> >
> > how could I decrypt this file on the Pocket PC? I need to open an

encrypted
> > xml file on PPC, it also could be encrypted with a different method. I

need
> > to load the xml file into a dataset.
> >
> > Thanks for your help
> >
> > Thomas
> >
> >
> >
> >



 
Reply With Quote
 
=?Utf-8?B?QWxleCBZYWtobmluIFtNVlBd?=
Guest
Posts: n/a
 
      21st Dec 2004
Tak a look at this article in the MSDN docs:

ms-help://MS.MSDNQTR.2004JUL.1033/dnnetsec/html/cryptosimplified.htm

or online:

http://msdn.microsoft.com/library/de...simplified.asp

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com
www.opennetcf.org
My blog: http://blog.opennetcf.org/ayakhnin

"Dalli" wrote:

> Are there examples how to encrypt / decrypt a whole file and read it with
> the xmlreader?
>
> Thomas
>
> "Alex Yakhnin [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:CCB6A6C6-06F1-4F0F-AE68-(E-Mail Removed)...
> > Take a look at SDF which supports quite a few assymetrical algorithms -

> RSA,
> > MD5, SHA1 etc..
> >
> > --
> > Alex Yakhnin, .NET CF MVP
> > www.intelliprog.com
> > www.opennetcf.org
> > My blog: http://blog.opennetcf.org/ayakhnin
> >
> >
> > "Dalli" wrote:
> >
> > > Hello,
> > >
> > > if I have an Xml-File on the "normal" PC, which is encrypted by the
> > > following method:
> > >
> > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> > > System.EventArgs) Handles Button1.Click
> > > 'Encrypt the data set and write it to file.
> > > Dim aXmlTextWriter As Xml.XmlTextWriter
> > >
> > > aXmlTextWriter = New XmlTextWriter("myXML.xml", Encoding.UTF8)
> > >
> > > Dim aUE As New UnicodeEncoding()
> > > Dim key() As Byte = aUE.GetBytes("password")
> > > Dim RMCrypto As RijndaelManaged = New RijndaelManaged()
> > > Dim aCryptoStream As New CryptoStream(aXmlTextWriter.BaseStream,

> _
> > > RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write)
> > >
> > > ds.WriteXml(aCryptoStream)
> > > aCryptoStream.Close()
> > >
> > > 'Clear the dataset so we can see that it is empty before
> > > 'we decrypt the encrypted file.
> > > ds.Clear()
> > > End Sub
> > >
> > > See Source on
> > >

> http://www.experts-exchange.com/Prog..._20598364.html
> > >
> > > how could I decrypt this file on the Pocket PC? I need to open an

> encrypted
> > > xml file on PPC, it also could be encrypted with a different method. I

> need
> > > to load the xml file into a dataset.
> > >
> > > Thanks for your help
> > >
> > > Thomas
> > >
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
Dalli
Guest
Posts: n/a
 
      22nd Dec 2004
Thanks I will take a look


"Alex Yakhnin [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
news:2A25A9A6-36A4-4CD4-ADA6-(E-Mail Removed)...
> Tak a look at this article in the MSDN docs:
>
> ms-help://MS.MSDNQTR.2004JUL.1033/dnnetsec/html/cryptosimplified.htm
>
> or online:
>
>

http://msdn.microsoft.com/library/de...simplified.asp
>
> --
> Alex Yakhnin, .NET CF MVP
> www.intelliprog.com
> www.opennetcf.org
> My blog: http://blog.opennetcf.org/ayakhnin
>
> "Dalli" wrote:
>
> > Are there examples how to encrypt / decrypt a whole file and read it

with
> > the xmlreader?
> >
> > Thomas
> >
> > "Alex Yakhnin [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
> > news:CCB6A6C6-06F1-4F0F-AE68-(E-Mail Removed)...
> > > Take a look at SDF which supports quite a few assymetrical

algorithms -
> > RSA,
> > > MD5, SHA1 etc..
> > >
> > > --
> > > Alex Yakhnin, .NET CF MVP
> > > www.intelliprog.com
> > > www.opennetcf.org
> > > My blog: http://blog.opennetcf.org/ayakhnin
> > >
> > >
> > > "Dalli" wrote:
> > >
> > > > Hello,
> > > >
> > > > if I have an Xml-File on the "normal" PC, which is encrypted by the
> > > > following method:
> > > >
> > > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> > > > System.EventArgs) Handles Button1.Click
> > > > 'Encrypt the data set and write it to file.
> > > > Dim aXmlTextWriter As Xml.XmlTextWriter
> > > >
> > > > aXmlTextWriter = New XmlTextWriter("myXML.xml",

Encoding.UTF8)
> > > >
> > > > Dim aUE As New UnicodeEncoding()
> > > > Dim key() As Byte = aUE.GetBytes("password")
> > > > Dim RMCrypto As RijndaelManaged = New RijndaelManaged()
> > > > Dim aCryptoStream As New

CryptoStream(aXmlTextWriter.BaseStream,
> > _
> > > > RMCrypto.CreateEncryptor(key, key), CryptoStreamMode.Write)
> > > >
> > > > ds.WriteXml(aCryptoStream)
> > > > aCryptoStream.Close()
> > > >
> > > > 'Clear the dataset so we can see that it is empty before
> > > > 'we decrypt the encrypted file.
> > > > ds.Clear()
> > > > End Sub
> > > >
> > > > See Source on
> > > >

> >

http://www.experts-exchange.com/Prog..._20598364.html
> > > >
> > > > how could I decrypt this file on the Pocket PC? I need to open an

> > encrypted
> > > > xml file on PPC, it also could be encrypted with a different method.

I
> > need
> > > > to load the xml file into a dataset.
> > > >
> > > > Thanks for your help
> > > >
> > > > Thomas
> > > >
> > > >
> > > >
> > > >

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to decrypt an encrypted file =?Utf-8?B?SGlwcG8=?= Windows XP General 2 28th Mar 2007 01:15 AM
Can we use csp program to decrypt ms word encrypted file ? =?Utf-8?B?Y3NwIHByb2JsZW0gZnJvbSBzc2NvbnRyaWJ1dG9y Microsoft Word Document Management 2 25th Oct 2006 12:45 PM
Decrypt file in VB6 encrypted within VB Dot NET mark.brown@safefinancials.co.uk Microsoft VB .NET 6 2nd Aug 2005 02:49 PM
decrypt an encrypted xml file using compact framework janhm Microsoft C# .NET 2 14th Jun 2005 09:34 PM
How to decrypt an encrypted file. =?Utf-8?B?UnV0aA==?= Microsoft Word Document Management 2 13th May 2005 12:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 PM.