Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigInteger initialisation #3

Open
createS0ftware opened this issue Apr 15, 2019 · 7 comments
Open

BigInteger initialisation #3

createS0ftware opened this issue Apr 15, 2019 · 7 comments
Labels
question Further information is requested

Comments

@createS0ftware
Copy link

Hi

What is the correct way to initialise BigInteger ?

I keep getting a NPE

Thanks

@RiccardoM
Copy link
Collaborator

RiccardoM commented Apr 16, 2019

Could you please provide a snapshot of the code you are using? Also the platform you are developing for would be very useful

@ligi
Copy link
Member

ligi commented Apr 16, 2019

this seems related and has some details komputing/KHash#11

@createS0ftware
Copy link
Author

createS0ftware commented Apr 16, 2019

Yes, it is related. I thought the problem was in that library but it's in this one.

In the Keccak class

private val BIT_65 = BigInteger.ONE.shiftLeft(64)

private val MAX_64_BITS = BIT_65.subtract(BigInteger.ONE)

BigInteger is not initialised prior to this call. I can't seem to find an appropriate way to initialise it

@RiccardoM
Copy link
Collaborator

@createS0ftware Are you using which module? The common one or the JVM one?

@createS0ftware
Copy link
Author

JVM one

@RiccardoM
Copy link
Collaborator

I'm trying to reproduce the error but I don't seem able to do so. Could you please provide us with a full stack trace of the error?

@createS0ftware
Copy link
Author

Ok - i will. However, i think i have found a possible fix. I am not importing the library correctly - the architecture of my kotlin multiplatform project, i think is wrong.

Also i am targeting Android, IOS and JVM . I'll update yo tomorrow

Thanks

@RiccardoM RiccardoM added the question Further information is requested label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants