MCPcopy Create free account
hub / github.com/assaultcube/AC / bin2hex

Function bin2hex

source/src/crypto.cpp:528–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526/////////////////////////////////////////////// hex converters /////////////////////////////////////////////////////////////////////////////////////
527
528const char *bin2hex(char *d, const uchar *s, int len)
529{ // d needs to be at least of size 2 * len + 1
530 len *= 2;
531 loopi(len) d[i] = hexdigits[(s[i / 2] >> ((i & 1) ? 0 : 4)) & 0xf];
532 d[len] = '\0';
533 return d;
534}
535
536int hex2bin(uchar *d, const char *s, int maxlen)
537{

Callers 15

loopvjFunction · 0.85
parsemessagesFunction · 0.85
ed25519testFunction · 0.85
savepreprivkeyFunction · 0.85
saveprivkeyFunction · 0.85
authsetupFunction · 0.85
mypubkeyFunction · 0.85
authkey_Function · 0.85
parseMethod · 0.85
signMethod · 0.85
demoworkerthreadFunction · 0.85
polldeferredprocessingFunction · 0.85

Calls 1

loopiFunction · 0.70

Tested by

no test coverage detected