bitpay / bitcore-mnemonic

BIP39 Mnemonics implemented for Bitcore
http://bitcore.io
MIT License
155 stars 212 forks source link

Fix a bug in Mnemonic._entropyChecksum #29

Closed Flavien closed 8 years ago

Flavien commented 8 years ago

The result of toString on a number can be different across browsers for large numbers. In particular, it's possible for IE to use exponential notation, which was breaking Mnemonic._entropyChecksum.

This can be reproduced using this seed: patrol wise idea oyster inquiry crash dignity chronic scatter time admit pet, which is valid on Chrome and Firefox, but invalid on IE11 and Edge.