base58

package module
v0.0.0-...-69e2d70 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BitcoinAlphabet is the bitcoin alphabet.
	BitcoinAlphabet, _ = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")

	// FlickrAlphabet is the flickr alphabet.
	FlickrAlphabet, _ = NewAlphabet("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ")
)

Functions

func Decode

func Decode(src string) ([]byte, error)

func DecodeAlphabet

func DecodeAlphabet(src string, alphabet *Alphabet) ([]byte, error)

func Encode

func Encode(src []byte) string

func EncodeAlphabet

func EncodeAlphabet(src []byte, alphabet *Alphabet) string

Types

type Alphabet

type Alphabet struct {
	Decode [128]int8
	Encode [58]byte
}

func NewAlphabet

func NewAlphabet(src string) (*Alphabet, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL