javascript - Convert a decimal number represented as a string to its hex format still representing it as a string -


I am trying to work in the 160 bit integer using the bigInteger.js library, but I make a representation I want them to be in hex format, so I can transmit them and use them as IDs.

  var git_sha1 = require ('git-sha1'); Var bigInt = is required ("big-integer"); Var uuid = git_sha1 ((~~ (math.rendum) * 1e9)). ToString (36) + date.non ()); Console.log ('hex \ t', in uuid); // see UIId I console.log ('in dec \ t', bigInt (uuid, 16) .toString ()); // Change it to bigInt and then display it as string console.log ('hex \ t', bigInt (uuid, 16) .toString (16)); // Try it back to Hex   

Here's my output:

 In  Hex 4044654fce69424a651af2825b37124c25094658 December 366900685503779409298642816707647664013657589336 Hex 366900685503779409298642816707647664013657589336   

I should be like hex for hex . Any suggestions? Thanks!

it was fixed with PR

Comments

Popular posts from this blog

mysql - where clause in inner join query -

java - Why my included JSP file won't get processed correctly? -

php - MySQL Query for Advanced Search multiple criteria -