www/hce-util.js
// one byte unsigned int to padded hex string
one byte unsigned int to padded hex string
one byte unsigned int to padded hex string
function toHex(i) {
    if (i < 0 || i > 255) {
      throw('Input must be between 0 and 255. Got ' + i + '.');
    }
    return ('00' + i.toString(16)).substr(-2);
}
function toHex ( i ) { if ( i < 0 || i > 255 ) { throw ( 'Input must be between 0 and 255. Got ' + i + '.' ) ; } return ( '00' + i . toString ( 16 ) ) . substr ( - 2 ) ; }
one byte unsigned int to padded hex string
one byte unsigned int to padded hex string