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

bip38: add verify and tests #7

Merged
merged 1 commit into from
Dec 23, 2014
Merged

bip38: add verify and tests #7

merged 1 commit into from
Dec 23, 2014

Conversation

dcousens
Copy link
Contributor

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
Copy link
Contributor Author

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

{
"description": "Length > 39",
"exception": "Invalid BIP38 data length",
"hex": "0142c000000000000000000000000000000000000000000000000000000000000000000000000000",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hex has been added for easy peer review, but is not needed by the tests.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling c51d7bb on verify into 5986f7e on master.

@jprichardson
Copy link
Member

Awesome! Will review tomorrow.

jprichardson added a commit that referenced this pull request Dec 23, 2014
bip38: add verify and tests
@jprichardson jprichardson merged commit ce22e33 into master Dec 23, 2014
@dcousens dcousens deleted the verify branch August 17, 2017 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants