MCPcopy Create free account
hub / github.com/ddnet/ddnet / str_hex_decode

Function str_hex_decode

src/base/str.cpp:671–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671int str_hex_decode(void *dst, int dst_size, const char *src)
672{
673 unsigned char *cdst = (unsigned char *)dst;
674 int slen = str_length(src);
675 int len = slen / 2;
676 int i;
677 if(slen != dst_size * 2)
678 return 2;
679
680 for(i = 0; i < len && dst_size; i++, dst_size--)
681 {
682 if(byteval(src + i * 2, cdst++))
683 return 1;
684 }
685 return 0;
686}
687
688void str_base64(char *dst, int dst_size, const void *data_raw, int data_size)
689{

Callers 6

ParseUuidFunction · 0.85
ConAuthAddHashedMethod · 0.85
ConAuthUpdateHashedMethod · 0.85
TESTFunction · 0.85
sha256_from_strFunction · 0.85
md5_from_strFunction · 0.85

Calls 2

str_lengthFunction · 0.85
bytevalFunction · 0.85

Tested by 1

TESTFunction · 0.68