2021-02-25-0523Z


I thought I'd blogged on this base58 spec years ago, but if so I can't find it. It's utter garbage. There are two errors in the test vectors, for fucksakes. The given encoding for "Hello, World!" decodes to "Hello World!" without the comma, and there's an extra "1" in the encoded string for the hex number. And that doesn't even address the descriptions of encoding, which doesn't work correctly, and that for decoding, which is totally unintelligible.

The pip-installed base58 decoder, version 1.0.3, gives trailing garbage when encoded text is fed right back through the decoder. But how can you blame them when the spec is so bad?

I'm now using jgarzik's code as a basis for my own.

Back to blog or home page

last updated 2021-02-25 00:30:19. served from tektonic.jcomeau.com