BigInt icon indicating copy to clipboard operation
BigInt copied to clipboard

Add support for hexadecimal string in constructor

Open prateekroy opened this issue 7 years ago • 9 comments

I think it will be useful for the BigInt to take hex as input and represent it as BigInt and support all the operations? Let me know what you think of it and I can start working on it.

prateekroy avatar Oct 23 '18 04:10 prateekroy

@prateekroy I don't see how it would be useful. Can you give a few examples?

faheel avatar Oct 28 '18 09:10 faheel

@faheel I was thinking of something like this BigInt("0xFFABFF") and support all the operations for this BigInt.

BigInt("0xA") + BigInt("1") = "0xB".

prateekroy avatar Nov 09 '18 17:11 prateekroy

@prateekroy Seems like a useful feature to have for some use cases.

If anyone's interested in taking up this issue then feel free to create a PR

faheel avatar Jun 01 '19 18:06 faheel

When to expect this feature?

EndrII avatar Jun 04 '19 06:06 EndrII

I would like to have a feature to read a byte array into a BigNum, I'm using this library to get big num data from a server. If I end up doing it myself, but It could be nice to have it in the library.

Rucadi avatar Mar 22 '20 19:03 Rucadi

i recomendet use gmp wraper for C++ https://github.com/QuasarApp/QtBigInt

EndrII avatar Mar 23 '20 06:03 EndrII

Sorry for the long delay in looking into this feature. Looks like multiple people are interested in it, so I'll take a look at the PR once I get more time.

faheel avatar Oct 05 '20 18:10 faheel

Hey is it ok if I look into this feature?

cwsimms-98 avatar Apr 25 '21 12:04 cwsimms-98

Handling many bases is better in my opinion

touatily avatar Jan 03 '24 12:01 touatily