While dealing with storing parts of an X509 certificate, I’ve found the need for a couple of utility methods that allow converting the string representations of the Public Key to a byte array (or vice versa). That’s what the HexToBin() method does. Included also is BinToHex() for going the other direction.
If you found this article helpful:
4.26.2006
HexToBin and BinToHex
Subscribe to:
Post Comments (Atom)


3 comments:
Oh yea - a null check on the passed in string argument would be wise in the HexToBin(s) method.
Are you converting to VB?
Hah - naw, I code in whatever the client dictates. :D VB.NET, C#, RPG.NET. It's all the same. :) My preferences is still C#.
Post a Comment