Re: Encrytion causing error
- From: "Grant Merwitz" <grant@xxxxxxxxxxxxx>
- Date: Fri, 5 Aug 2005 16:03:22 +0100
sorry, i thought you were trying to place the encrypted string into an XML
file. Didn't realise it was a Web Service.
Not sure if an encrypted over Xml through a web service would break it.
People must pass encrypted values of Web Services all the time.
Just a thought - as web services are http based, maybe the encryption it
creating a character there that could break it.
Maybe give UrlEncoding the string a try. ... Just an idea, and a problem
i've come across passing encrypted values through Http
"Chris Kennedy" <chrisknospam@xxxxxxxxxxxx> wrote in message
news:%23eULBpcmFHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
> The function is a webservice. I am passing the encrypted text as a string.
> I am assuming it can't convert it to XML.
>
> "Grant Merwitz" <grant@xxxxxxxxxxxxx> wrote in message
> news:OiSP7kcmFHA.1148@xxxxxxxxxxxxxxxxxxxxxxx
>> Try enclose the encrypted data in CDATA tags
>>
>> <SomeNode>
>> <![CDATA[
>> encrypted data with invalid characters go here
>> ]]>
>> </SomeNode>
>>
>> "Chris Kennedy" <chrisknospam@xxxxxxxxxxxx> wrote in message
>> news:esSd2ccmFHA.2484@xxxxxxxxxxxxxxxxxxxxxxx
>>>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.
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Encrytion causing error
- From: Chris Kennedy
- Re: Encrytion causing error
- References:
- Encrytion causing error
- From: Chris Kennedy
- Re: Encrytion causing error
- From: Grant Merwitz
- Re: Encrytion causing error
- From: Chris Kennedy
- Encrytion causing error
- Prev by Date: Best way to modify HTML HEAD from web control
- Next by Date: Custom onclick event for composite control
- Previous by thread: Re: Encrytion causing error
- Next by thread: Re: Encrytion causing error
- Index(es):
Relevant Pages
|