bitcoinjs / bip38

BIP38 is a standard process to encrypt Bitcoin and crypto currency private keys that is less susceptible to brute force attacks thus protecting the user.
http://cryptocoinjs.com/modules/currency/bip38/
MIT License
208 stars 100 forks source link

bip38: add verify and tests #7

Closed dcousens closed 9 years ago

dcousens commented 9 years ago

As the title suggests, this adds verification functions to easily verify if a given string is a BIP38 encrypted. A positive verification takes way too long if you try to do it using the try { decrypt ... return true } catch (e) { return false } idiom.

dcousens commented 9 years ago

Naturally, this also adds more tests for the decrypt function, which is always good too.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling c51d7bb16f997cce6f6dbd250e0e62397eb2cc5b on verify into 5986f7e80cde136cb8c612dcab77ff8b43e6cfaa on master.

jprichardson commented 9 years ago

Awesome! Will review tomorrow.