keystore_lib/src/util/ksutil.cpp
void hexDumpInternal(const char *txt, const uint8_t *ptr, size_t size)
{
  unsigned int lineLen = 0;

  printf("%s: size: %zu ptr: 0x%p\n", txt, size, (void *) ptr);

  while (size--)
  {
    // The data bytes
    printf("%02x ", *ptr++);

    ++lineLen;

    // Fixed line length or until we run out of data
    if ((lineLen == MAX_LINE_LEN) || (size == 0))
    {
      printf("\n");
      lineLen = 0;
    }
  }
}
/*
 * Function prints buffer in special formated way 0x<value>
 * @param txt data spacing string
 * @param ptr input buffer
 * @param size input buffer size
 * @param buffer printed line buffer
 */
Function prints buffer in special formated way 0x
@param txt data spacing string
@param ptr input buffer
@param size input buffer size
@param buffer printed line buffer
Function prints buffer in special formated way 0x @param txt data spacing string @param ptr input buffer @param size input buffer size @param buffer printed line buffer
void hexDumpInternal(const char *txt, const uint8_t *ptr, size_t size)
{
  unsigned int lineLen = 0;
  printf("%s: size: %zu ptr: 0x%p\n", txt, size, (void *) ptr);
  while (size--)
  {
    printf("%02x ", *ptr++);
    ++lineLen;
    if ((lineLen == MAX_LINE_LEN) || (size == 0))
    {
      printf("\n");
      lineLen = 0;
    }
  }
}
void hexDumpInternal ( const char * txt , const uint8_t * ptr , size_t size ) { unsigned int lineLen = 0 ; printf ( " \n " , txt , size , ( void * ) ptr ) ; while ( size -- ) { printf ( " " , * ptr ++ ) ; ++ lineLen ; if ( ( lineLen == MAX_LINE_LEN ) || ( size == 0 ) ) { printf ( " \n " ) ; lineLen = 0 ; } } }
Function prints buffer in special formated way 0x<value>
 @param txt data spacing string
 @param ptr input buffer
 @param size input buffer size
 @param buffer printed line buffer
Function prints buffer in special formated way 0x<value > @param txt data spacing string @param ptr input buffer @param size input buffer size @param buffer printed line buffer
// The data bytes // Fixed line length or until we run out of data