System.Xml??!!??

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

--
03 Feb 2005 10: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")
xmlRead.Read()

If xmlRead.HasValue Then
xmlRead.MoveToElement()
xmlKeys = xmlRead.ReadElementString
End If

rsa.FromXmlString(xmlKeys)

CypherTextBArray = bytItem

RestorePlainText = rsa.Decrypt(CypherTextBArray, False)

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

--
10 Mar 2005 07: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
---