build/authorify.js
function _bnToBytes(b) {
  // prepend 0x00 if first byte >= 0x80
  var hex = b.toString(16);
  if(hex[0] >= '8') {
    hex = '00' + hex;
  }
  return forge.util.hexToBytes(hex);
}
function _bnToBytes(b) {
  // prepend 0x00 if first byte >= 0x80
  var hex = b.toString(16);
  if(hex[0] >= '8') {
    hex = '00' + hex;
  }
  return forge.util.hexToBytes(hex);
}
function _bnToBytes ( b ) { // prepend 0x00 if first byte >= 0x80 var hex = b . toString ( 16 ) ; if ( hex [ 0 ] >= '8' ) { hex = '00' + hex ; } return forge . util . hexToBytes ( hex ) ; }
Converts a positive BigInteger into 2's-complement big-endian bytes.

@param b the big integer to convert.

@return the bytes.
Converts a positive BigInteger into 2 s - complement big - endian bytes .