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

Refactored to allow multiple encodings, set two default encodings, maintained compatibility #2

Closed
wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 30, 2015

Tests are passing but it might still be explosive to downstream users, I don't know. I needed to use a different alphabet, and instead of forking or creating a redundant new library, I decided having one canonical base58 made more sense.

Eager for your thoughts! :)

Cathal Garvey added 2 commits September 30, 2015 17:24
As part of this, added two built-in encodings and a factory function:

* DefaultEncoding is the encoding previously used by this library and
  has two methods renamed globally for compatibility reasons.
* StdEncoding is the encoding used by Python's base58 package and, IIRC,
  bitcoin and others.

The encoder structs have two new methods that accept byte-strings and
emit byte-strings, also.

Tests pass but none have been added to test new functionality, yet.
@tv42
Copy link
Owner

tv42 commented May 5, 2021

Sorry for almost literally never getting back to this, I just got around to bringing this code up to newer standards. I think I prefer simplicity over compatibility and potential for confusion. You may prefer using e.g. https://pkg.go.dev/github.com/cmars/basen and that's fine too.

@tv42 tv42 closed this May 5, 2021
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.

1 participant