PHP Convert C# Hex Blob Hexadecimal String back to Byte Array prior to decryption

Posted by PolishHurricane on Stack Overflow See other posts from Stack Overflow or by PolishHurricane
Published on 2012-07-05T20:36:06Z Indexed on 2012/07/05 21:15 UTC
Read the original article Hit count: 319

Filed under:
|
|
|
|

I have a piece of data that I am receiving in hexadecimal string format, example: "65E0C8DEB69EA114567954". It was made this way in C# by converting a byte array to a hexadecimal string. However, I am using PHP to read this string and need to temporarily convert this back to the byte array. If it matters, I will be decrypting this byte array, then reconverting it to unencrypted hexadecimal and or plaintext, but I will figure that out later.

So the question is, how do I convert a string like the above back to an encoded byte array/ blob in PHP?

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about php