HexString to Byte[]

T

Tina

the following method converts an encrypted byte[] to a hex string so I can
put it into a querystring...

public static string ByteArrayToHexString(byte[] arrInput)
{

StringBuilder sOutput = new StringBuilder(arrInput.Length);
for (int i = 0; i < arrInput.Length -1; i++)
{
sOutput.Append(arrInput.ToString("X2"));
}
return sOutput.ToString();
}

How do I convert it back to a byte[] on the other side?
Thanks,
T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top