-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
> base58Check.encode(base58Check.decode('mqqa8xSMVDyf9QxihGnPtap6Mh6qemUkcz'));
'mqqa8xSMVDyf9QxihGnPtap6Mh6qemUkcu'
Note I changed the last character of the input string to a 'z', making the checksum invalid, but the error wasn't detected.
Something like this fixes the error:
--- Backup/base58.js.~1~ 2014-05-24 07:06:08.000000000 -0700
+++ base58.js 2014-11-30 16:53:50.625920249 -0800
@@ -94,7 +94,7 @@
var hash = doubleSHA256(data);
var hash4 = hash.slice(0, 4);
- if (csum.toString() != hash4.toString()) {
+ if (JSON.stringify(csum) != JSON.stringify(hash4)) {
throw new Error("checksum mismatch");
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels