D
Dalli
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/Programming/Programming_Languages/Dot_Net/Q_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
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/Programming/Programming_Languages/Dot_Net/Q_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