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:
bufsource pointerlenhow many bytes to printoffsetincrement printed offset by this valuewidthhow many bytes on a line
function lt_btox
Convert a byte array to hexadecimal string.
Parameters:
srcsource byte arraylensource length (bytes)destdestination string
Returns:
destination string
function lt_rand_bytes
Generate random bytes using rand().
Parameters:
bufdestination pointerlenhow many bytes to generate
function lt_xtob
Convert a hexadecimal string to byte array.
Parameters:
srcsource stringlensource length (chars)destdestination byte array
Returns:
destination byte array
The documentation for this class was generated from the following file cores/common/base/api/lt_utils.c