R
RubenDV
I want to convert a message digest string like
f5d73823596b869ef5ddf38af0920688a52257b2 into an array of unsigned
chars , for example (with the previously mentioned message digest
string) :
buf[0] = 0xf5
buf[1] = 0xd7
buf[2] = 0x38
....
This way, when the message digest string is of length x, buf contains
x/2 values because each element consists of 2 hexadecimal digits.
Could somebody give me a function that does this? I have been trying
with sscanf( ) but i wasn't able to do it.
Thanks in advance!
f5d73823596b869ef5ddf38af0920688a52257b2 into an array of unsigned
chars , for example (with the previously mentioned message digest
string) :
buf[0] = 0xf5
buf[1] = 0xd7
buf[2] = 0x38
....
This way, when the message digest string is of length x, buf contains
x/2 values because each element consists of 2 hexadecimal digits.
Could somebody give me a function that does this? I have been trying
with sscanf( ) but i wasn't able to do it.
Thanks in advance!