Re: Encrytion causing error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.
>>>
>>
>>
>
>


.



Relevant Pages

  • RE: RSA Encryption: Saving keys as files, and size of encrypted data
    ... private static void GenerateKeys(string pubFile, ... // Write the public and private key in files. ... The asymmetric encryption is not suitable for the encryption of large ... key as an xml string. ...
    (microsoft.public.dotnet.security)
  • RE: Web.Config and appSettings tag
    ... that was using the connection string was somehow being initialized before I ... > The values are encrypted using the encryption available in .NET. ... > following error message "Format of the initialization string does not conform ... > at the beginning of the web service function. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Encrytion causing error
    ... When I send the string encrypted i can return the encrypted string (as a ... Dim buffer As Byte= Convert.FromBase64String ... Didn't realise it was a Web Service. ... > Just a thought - as web services are http based, maybe the encryption it ...
    (microsoft.public.dotnet.framework.aspnet)
  • OpenOffice encryption
    ... >OpenOffice uses cipher in OFB mode with salt. ... OpenOffice seems to have two encryption algorithms. ... The other encryption algorithms used in OpenOffice is XML encryption. ...
    (sci.crypt)
  • Re: [PHP] sharing info between websites with XML?
    ... what kind of data you're sharing) in an easy to parse format (CSV, XML, ... It's relatively easy to setup the clients to login ... PHP supports encryption if you install the necessary libraries ... and configure PHP accordingly (manual> Mcrypt Encryption Functions). ...
    (php.general)