lib/raddec.js
function toHexString(number, numberOfBytes) {
  numberOfBytes = numberOfBytes || 1;
  let hexString = '00'.repeat(numberOfBytes) + number.toString(16);

  return hexString.substr(-2 * numberOfBytes);
}
function toHexString(number, numberOfBytes) {
  numberOfBytes = numberOfBytes || 1;
  let hexString = '00'.repeat(numberOfBytes) + number.toString(16);

  return hexString.substr(-2 * numberOfBytes);
}
function toHexString ( number , numberOfBytes ) { numberOfBytes = numberOfBytes || 1 ; let hexString = '00' . repeat ( numberOfBytes ) + number . toString ( 16 ) ; return hexString . substr ( - 2 * numberOfBytes ) ; }
Convert the given number to a hexadecimal string of the given length.
@param {Number} number The given number.
@param {Number} numberOfBytes The number of bytes of hex string.
@return {String} The resulting hexadecimal string.
Convert the given number to a hexadecimal string of the given length .