Last Post 10 Mar 2005 06:39 AM by xfonhe. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

03 Feb 2005 09:44 AM
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!!!

Code Sample:
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
End If


CypherTextBArray = bytItem

RestorePlainText = rsa.Decrypt(CypherTextBArray, False)

For i As Integer = 0 To (RestorePlainText.Length - 1) Step 2
Decrypt &= Chr(RestorePlainText(i))
End Function
New Member
New Member

10 Mar 2005 06:39 AM
Ensure you are using proper class inherritance. Appears to me that it is failing because it does not have the proper class definition provided (doesn't know "System.XML")

Acceptable Use Policy