|
* Michal Kottman:
Caution: this doesn't work with signed chars, you have to change s to
> Another (faster) alternative is to avoid the sprintf() call and
> calculate hex string directly:
>
> static char hex[] = "0123456789ABCDEF";
>
> ...
>
> for ( p = ns , max = size ; max > 0 ; max--)
> {
> *p++ = hex[*s >> 4];
> *p++ = hex[*s++ & 0xF];
> }
a pointer to an unsigned char in Sean's code.