You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MosaicNonce createFromBigInteger(BigInteger number) method uses little endian when converting big integer to byte array (nonce)
int getNonceAsInt() on the other hand uses big endian to convert byte array to int
this inconsistency creates confusing situation when making invocation like this createFromBigInteger(BigInteger.ONE).getNonceAsInt()
One would expect this to return 1 but it does not because of the mismatch
The text was updated successfully, but these errors were encountered:
tonowie
changed the title
MosaicNonce uses inconsistent serialization/deserialization
MosaicNonce uses inconsistent serialization/deserialization between byte[] and numbers
May 11, 2019
MosaicNonce createFromBigInteger(BigInteger number)
method uses little endian when converting big integer to byte array (nonce)int getNonceAsInt()
on the other hand uses big endian to convert byte array to intthis inconsistency creates confusing situation when making invocation like this
createFromBigInteger(BigInteger.ONE).getNonceAsInt()
One would expect this to return 1 but it does not because of the mismatch
The text was updated successfully, but these errors were encountered: