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

fix: handle SimpleSigner privateKey 0x hex prefix by stripping it #93

Merged
merged 1 commit into from
May 29, 2020

Conversation

PeterTheOne
Copy link
Contributor

It is common to use 0x as a prefix in hex strings, some libs return private keys with that prefix, but SimpleSigner doesn't handle them.

For example ethers.js HDNode returns a hex string with 0x. It took some time to notice why my signed JWT wasn't valid: Error: Signature invalid for JWT.

It is common to use 0x as a prefix in hex strings, some libs return private keys with that prefix, but SimpleSigner doesn't handle them.
Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

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

Looks great.
Thank you!

@mirceanis mirceanis merged commit 47595d3 into decentralized-identity:master May 29, 2020
uport-automation-bot pushed a commit that referenced this pull request May 29, 2020
## [4.3.3](4.3.2...4.3.3) (2020-05-29)

### Bug Fixes

* handle SimpleSigner privateKey 0x hex prefix by stripping it ([#93](#93)) ([47595d3](47595d3))
@uport-automation-bot
Copy link
Collaborator

🎉 This PR is included in version 4.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants