Passing in Hex values for encryption

From: dean (abc_at_def.com)
Date: 05/27/03


Date: Tue, 27 May 2003 12:41:37 +0200


Hi,

Does anyone know a neat and tidy way of converting a string of Hex values
into a byte array. I am given strings of Hex values in the format -
"8F5E6EBABC0E2F9249E5C2010708C834" that need to be encrypted. At the moment
I am looping through the length of the string (using step 2) and then
extrracting the values out using hex calculations eg 8*16 + 15 for 8F.

I am finding the number of ToString, ToBase64 etc methods that are dotted
around hard to keep a track of at times. Are there any convert funcions
built into Dotnet that would help?

Thanks for the help

Dan



Relevant Pages

  • Re: Read Base64 string to write a .gif (or other content type)
    ... -AC [MVP MCMS] http://www.andrewconnell.com http://www.andrewconnell.com/mvp ... converting the string to a byte array. ... I've tried writing out "GIF89a" at the start and then the byte array, ...
    (microsoft.public.dotnet.languages.csharp)
  • Posting Large Data to Querystring
    ... Arraylist that is converted into a string of hex values. ... just converting it to a string of hex values (which doubles the ... PS. the hash needs to be URL Safe. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Converting a string to an array of bytes.
    ... The user must be able to type in a string of characters that include non ... alt+159 and when converting that string to a byte array ... you would get an array with one element with the byte value 159. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: What does this mean?
    ... well its an array of unsigned char, initialised with a string. ... contains hex values. ... It includes nul characters so you can't ... I'm not sure what you mean by "what does the value of the array ...
    (comp.lang.c)
  • Re: Read Base64 string to write a .gif (or other content type)
    ... converting the string to a byte array. ... I've tried writing out "GIF89a" at the start and then the byte array, ... then create a new binary file and write out the converted ...
    (microsoft.public.dotnet.languages.csharp)