KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
go-base58
★ 20
Open GitHub ↗
simple base58 codec
Download README (.md)
Explore Similar Repositories
blockify
:
Just code, don’t repeat.
pinax-project-teams
:
a starter project that has account management, profiles, teams and basic collaborative content.
angular-video
:
A directive that takes in a vimeo or a youtube url and converts it into an embedded friendly url and the displays it.
pixelated-dispatcher
:
Server component of Pixelated that allows running multiple instances of the user agent on a single server.
YO-iOS-SDK
:
Send a YO with a single line of code in Xcode.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
go-base58
?
Download (.md)
# go-base58 I extracted this package from https://github.com/conformal/btcutil to provide a simple base58 package that - defaults to base58-check (btc) - and allows using different alphabets. ## Usage ```go package main import ( "fmt" b58 "github.com/jbenet/go-base58" ) func main() { buf := []byte{255, 254, 253, 252} fmt.Printf("buffer: %v\n", buf) str := b58.Encode(buf) fmt.Printf("encoded: %s\n", str) buf2 := b58.Decode(str) fmt.Printf("decoded: %v\n", buf2) } ``` ### Another alphabet ```go package main import ( "fmt" b58 "github.com/jbenet/go-base58" ) const BogusAlphabet = "ZYXWVUTSRQPNMLKJHGFEDCBAzyxwvutsrqponmkjihgfedcba987654321" func encdec(alphabet string) { fmt.Printf("using: %s\n", alphabet) buf := []byte{255, 254, 253, 252} fmt.Printf("buffer: %v\n", buf) str := b58.EncodeAlphabet(buf, alphabet) fmt.Printf("encoded: %s\n", str) buf2 := b58.DecodeAlphabet(str, alphabet) fmt.Printf("decoded: %v\n\n", buf2) } func main() { encdec(b58.BTCAlphabet) encdec(b58.FlickrAlphabet) encdec(BogusAlphabet) } ``` ## License Package base58 (and the original btcutil) are licensed under the ISC License.