-
Notifications
You must be signed in to change notification settings - Fork 2.2k
add verifyBase64 #217
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
add verifyBase64 #217
Conversation
|
I've got some issues with this PR:
|
|
Also, you need to use two space soft tabs, per our code style convention. |
|
The use of base64 comes from the fact that web browsers doesn't support Buffer out of the box, that's why some unit has been added to validate this function when run in a web browser. |
|
Please only use the existing test suite. We use testling and browserify which allows you to test in the browser. You certainly don't need to include anything else (not jquery, and not the minified bitcoinjs). In short: As for the added functionality, I'm not opposed to it, it is only useful because @weilu thoughts? |
|
Yea this PR reminded me of the same thing you mentioned: "Buffer is not readily exposed in the browser", unless one uses browserify. We could either do what this PR suggested, or we could accept string for |
|
Or perhaps message.verify only accepts base64? What do most clients accept?
|
|
base64 for bitcoin qt ( Perhaps only accepting base64 is a good idea |
|
Everyone using base64 instead of hex is quite a WTF here, but if it's what everyone's doing, so be it. @FredericHeem Thank you very much for bringing this to our attention! We will make sure you can use this shortly. Unfortunately we cannot pull your request due to the testing, but I will make a new PR for this and be sure to give you credit for the proposal and fix. |
|
Adding browser based testing is useful and shouldn't be discarded. |
|
We have browser based testing, most of our mocha tests run in the browser. You can very easily add a test there, and it will be run in the browser. |
|
@FredericHeem the version of Bitcoin js you are using in that GitHub repository is pre 0.2.0. I'm actually thinking a base64 only verification is bad form, if anything it should be base58 check, assuming these are indeed user land signatures. We have a bit of leeway in changing the status quo here, and base64 isn't the ideal. |
Add the function verifyBase64 to check signatures compatible with bitcoind and armory.