fix incorrect checksum test on bip39 mnemonic decoding

This commit is contained in:
catbref 2018-12-17 14:33:33 +00:00
parent 3045841151
commit 999e6b7289

View File

@ -273,7 +273,7 @@ public class UtilsResource {
byte checksumNybble = (byte) (binary[16] & 0xf0);
byte[] checksum = Crypto.digest(entropy);
if ((checksum[0] & 0xf0) != checksumNybble)
if (checksumNybble != (byte) (checksum[0] & 0xf0))
return "false";
return Base58.encode(entropy);