Source File
alphabet.go
Belonging Package
github.com/mr-tron/base58/base58
package base58// Alphabet is a a b58 alphabet.type Alphabet struct {decode [128]int8encode [58]byte}// NewAlphabet creates a new alphabet from the passed string.//// It panics if the passed string is not 58 bytes long or isn't valid ASCII.func ( string) *Alphabet {if len() != 58 {panic("base58 alphabets must be 58 bytes long")}:= new(Alphabet)copy(.encode[:], )for := range .decode {.decode[] = -1}for , := range .encode {.decode[] = int8()}return}// BTCAlphabet is the bitcoin base58 alphabet.var BTCAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")// FlickrAlphabet is the flickr base58 alphabet.var FlickrAlphabet = NewAlphabet("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ")
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |