Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27052

VS 2012 How to Decrypt data from xml file

$
0
0
Hi all

I am saving sum Encrypted data to XML, then I'm reading that file in to a dataset. How do I Decrypt it before applying my filter. Only one column is encrypted there are 3 total.

NOTE: I have sum code to Encrypt/Decrypt the string from the file. This is a Function that returns the Encrypted/Decrypted Strings
Code:

DESEncrypt(String) and DESDecrypt(String)
Here's how I'm reading my XML file.
Code:

Dim ds As New DataSet
ds.Clear()

ds.ReadXml("UserData.xml")

Dim dt As DataTable = ds.Tables("UserData")

If tbFilter1.Text <> Nothing Then
    dt = dt.Select("UD1 LIKE '%" & tbFilter1.Text & "%'").CopyToDataTable
End If

Dim i As Integer
Dim j As Integ
Me.ListView1.Items.Clear()

For i = 0 To dt.Rows.Count - 1
  Dim dr As DataRow = dt.Rows(i)
  With Me.ListView1
      .Items.Add(dr(0))
        For j = 1 To dt.Columns.Count - 1
            .Items(i).SubItems.Add(dr(j))
        Next
    End With
Next


Viewing all articles
Browse latest Browse all 27052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>