Documentation ¶
Index ¶
- Variables
- func Decode(str string) ([]byte, error)
- func DecodeAlphabet(str string, alphabet *Alphabet) ([]byte, error)
- func Encode(bin []byte) string
- func EncodeAlphabet(bin []byte, alphabet *Alphabet) string
- func FastBase58Decoding(str string) ([]byte, error)
- func FastBase58DecodingAlphabet(str string, alphabet *Alphabet) ([]byte, error)
- func FastBase58Encoding(bin []byte) string
- func FastBase58EncodingAlphabet(bin []byte, alphabet *Alphabet) string
- func TrivialBase58Decoding(str string) ([]byte, error)
- func TrivialBase58DecodingAlphabet(str string, alphabet *Alphabet) ([]byte, error)
- func TrivialBase58Encoding(a []byte) string
- func TrivialBase58EncodingAlphabet(a []byte, alphabet *Alphabet) string
- type Alphabet
Constants ¶
This section is empty.
Variables ¶
var BTCAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")
BTCAlphabet is the bitcoin base58 alphabet.
var FlickrAlphabet = NewAlphabet("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ")
FlickrAlphabet is the flickr base58 alphabet.
Functions ¶
func DecodeAlphabet ¶
DecodeAlphabet decodes the base58 encoded bytes using the given b58 alphabet.
func EncodeAlphabet ¶
EncodeAlphabet encodes the passed bytes into a base58 encoded string with the passed alphabet.
func FastBase58Decoding ¶
FastBase58Decoding decodes the base58 encoded bytes.
func FastBase58DecodingAlphabet ¶
FastBase58DecodingAlphabet decodes the base58 encoded bytes using the given b58 alphabet.
func FastBase58Encoding ¶
FastBase58Encoding encodes the passed bytes into a base58 encoded string.
func FastBase58EncodingAlphabet ¶
FastBase58EncodingAlphabet encodes the passed bytes into a base58 encoded string with the passed alphabet.
func TrivialBase58Decoding ¶
TrivialBase58Decoding decodes the base58 encoded bytes (inefficiently).
func TrivialBase58DecodingAlphabet ¶
TrivialBase58DecodingAlphabet decodes the base58 encoded bytes (inefficiently) using the given b58 alphabet.
func TrivialBase58Encoding ¶
TrivialBase58Encoding encodes the passed bytes into a base58 encoded string (inefficiently).
func TrivialBase58EncodingAlphabet ¶
TrivialBase58EncodingAlphabet encodes the passed bytes into a base58 encoded string (inefficiently) with the passed alphabet.
Types ¶
type Alphabet ¶
type Alphabet struct {
// contains filtered or unexported fields
}
Alphabet is a a b58 alphabet.
func NewAlphabet ¶
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.