C
Chris Kennedy
I am encryted some data for use in calling an xml function
System.Xml.XmlException:'', hexadecimal value 0x13, is an invalid
character.
Here is my encryption function.
Function Encrypt(ByVal value As String) As String
Dim cryptoProvider As DESCryptoServiceProvider = New
DESCryptoServiceProvider()
Dim ms As MemoryStream = New MemoryStream()
Dim cs As CryptoStream = New CryptoStream(ms,
cryptoProvider.CreateEncryptor(key_64, IV_64), CryptoStreamMode.Write)
Dim sw As StreamWriter = New StreamWriter(cs)
sw.Write(value)
sw.Flush()
cs.FlushFinalBlock()
ms.Flush()
Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
End Function
Any ideas of how pass encrypted data as XML without XML illegal character
errors.
System.Xml.XmlException:'', hexadecimal value 0x13, is an invalid
character.
Here is my encryption function.
Function Encrypt(ByVal value As String) As String
Dim cryptoProvider As DESCryptoServiceProvider = New
DESCryptoServiceProvider()
Dim ms As MemoryStream = New MemoryStream()
Dim cs As CryptoStream = New CryptoStream(ms,
cryptoProvider.CreateEncryptor(key_64, IV_64), CryptoStreamMode.Write)
Dim sw As StreamWriter = New StreamWriter(cs)
sw.Write(value)
sw.Flush()
cs.FlushFinalBlock()
ms.Flush()
Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
End Function
Any ideas of how pass encrypted data as XML without XML illegal character
errors.