07-21-2009 12:15 PM
I'm sure there's a very simple solution, but I can't seem to find it anywhere.
I have a string that looks like this, "BÑ›c-Ûí3^¥‘¹&¯]" and I want it to look like this, "42D19B630B2DDBED335EA591B926AF5D".
I've tried typecast and unflatten without success. What function should I be using?
Solved! Go to Solution.
07-21-2009 12:27 PM - edited 03-08-2012 09:16 AM
If you just want to see the content in hexadecimal, right-click the indicator and switch to hex display.
If you want to format it as a hexadecimal formatted string (2 characters/byte, using characters 0..F exclusively), you could do the following:
There are many other ways to do all this. Here's a loop-free version:
07-21-2009 12:40 PM - edited 07-21-2009 12:42 PM
Thanks, your code does do what I need.
I should also more clear about what I am doing, so we can see if there are simpler solutions. I am writing a login using a 32 character hex hash read from a file, and comparing this to the output from the OpenG MD5 Digest function.
Edit: Thanks, your loop-free version looks like a good solution to me.
07-21-2009 12:43 PM
07-21-2009 12:49 PM
I don't have the openg toolkit installed at the moment. Is the output of the openG MD5 function a hexadecimal formatted string?
Do you need to format the string from the file or the output of the MD5?
You can go either way: comparing the binary strings or the hexadecimal formatted strings. Same difference.
I would store whatever you need to compare in the file so no conversion is needed at all.
07-21-2009 12:56 PM
07-21-2009 02:29 PM