code: function toHexString(buffer, options) {
          options = options || {};
          var prefix = options.prefix || '', digits, idx;
  
          if ((options.format || 'BE') !== 'BE') {
              _reverseBuffer(buffer);
          }
  
          digits = buffer.toString('hex');
          idx = _lastHeadIndex(digits, '0');
  
          // if there are only 0's use the last digit
          idx = idx >= 0 ? idx : digits.length - 1;
  
          return prefix + _pad(
              _split(digits.slice(idx), options.groupsize, options.delimiter), prefix, options.padstr, options.size);
      }
docs: /*
  Converts given input (node Buffer or array of bytes) to hexadecimal string 0xDDDD where D is [0-9a-f].
  All leading 0's are stripped out i.e. [0x00, 0x00, 0x00, 0x01] -> '0x1'