Why can I not reference this in custom code? I keep getting "System.Xml" is not defined
System.Cryptography is okay.
Basically I have RSA encrypted data that I must decrypt before generating the report. My private key is in an XML file, but I can't figure out another way to read the XML file and place the key in a string variable.
I'm hoping that I can decrypt the data with a function in reporting services, just will make my life easier.
Thanks for any help!!!
Public Shared Function Decrypt(ByVal bytItem As Byte()) As String
Dim rsa As System.Security.Cryptography.RSACryptoServiceProvider
Dim xmlRead as System.Xml.XmlTextReader
Dim xmlKeys As String
Dim RestorePlainText As Byte()
Dim CypherTextBArray As Byte()
xmlRead = New System.Xml.XmlTextReader("C:/****.xml")
If xmlRead.HasValue Then
xmlKeys = xmlRead.ReadElementString
CypherTextBArray = bytItem
RestorePlainText = rsa.Decrypt(CypherTextBArray, False)
For i As Integer = 0 To (RestorePlainText.Length - 1) Step 2
Decrypt &= Chr(RestorePlainText(i))