File lt_utils.c
FileList > api > lt_utils.c
Go to the source code of this file.
#include "lt_utils.h"
Public Functions
Type | Name |
---|---|
void | hexdump (const uint8_t * buf, size_t len, uint32_t offset=0, uint8_t width=16) Print data pointed to by buf in hexdump-like format (hex+ASCII). |
char * | lt_btox (const uint8_t * src, int len, char * dest) Convert a byte array to hexadecimal string. |
void | lt_rand_bytes (uint8_t * buf, size_t len) Generate random bytes using rand(). |
uint8_t * | lt_xtob (const char * src, int len, uint8_t * dest) Convert a hexadecimal string to byte array. |
Public Functions Documentation
function hexdump
Print data pointed to by buf in hexdump-like format (hex+ASCII).
Parameters:
buf
source pointerlen
how many bytes to printoffset
increment printed offset by this valuewidth
how many bytes on a line
function lt_btox
Convert a byte array to hexadecimal string.
Parameters:
src
source byte arraylen
source length (bytes)dest
destination string
Returns:
destination string
function lt_rand_bytes
Generate random bytes using rand().
Parameters:
buf
destination pointerlen
how many bytes to generate
function lt_xtob
Convert a hexadecimal string to byte array.
Parameters:
src
source stringlen
source length (chars)dest
destination byte array
Returns:
destination byte array
The documentation for this class was generated from the following file cores/common/base/api/lt_utils.c