MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_data_to_hex

Function ff_data_to_hex

libavformat/utils.c:458–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458char *ff_data_to_hex(char *buff, const uint8_t *src, int s, int lowercase)
459{
460 static const char hex_table_uc[16] = { '0', '1', '2', '3',
461 '4', '5', '6', '7',
462 '8', '9', 'A', 'B',
463 'C', 'D', 'E', 'F' };
464 static const char hex_table_lc[16] = { '0', '1', '2', '3',
465 '4', '5', '6', '7',
466 '8', '9', 'a', 'b',
467 'c', 'd', 'e', 'f' };
468 const char *hex_table = lowercase ? hex_table_lc : hex_table_uc;
469
470 for (int i = 0; i < s; i++) {
471 buff[i * 2] = hex_table[src[i] >> 4];
472 buff[i * 2 + 1] = hex_table[src[i] & 0xF];
473 }
474 buff[2 * s] = '\0';
475
476 return buff;
477}
478
479int ff_hex_to_data(uint8_t *data, const char *p)
480{

Callers 15

aa_read_headerFunction · 0.85
tak_read_headerFunction · 0.85
hex_logFunction · 0.85
mov_read_adrmFunction · 0.85
get_key_from_kidFunction · 0.85
do_encryptFunction · 0.85
hls_encryption_startFunction · 0.85
make_digest_authFunction · 0.85
md5_closeFunction · 0.85
do_llnw_authFunction · 0.85
open_inputFunction · 0.85
hls_read_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected