base58

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrZeroInputLength = errors.Const("input data has zero length")
	ErrHighBit         = errors.Const("high-bit set on invalid digit")
	ErrOutputNumber    = errors.Const("output number too big")
)

Variables

This section is empty.

Functions

func Decode

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

Decode - decode base58 with default encoder

func Encode

func Encode(in []byte) string

Encode - encode base58 with default encoder

Types

type Alphabet

type Alphabet interface {
	EncodeSymbols() [58]byte
	DecodeSymbols() [128]int8
}

Alphabet - base58 alphabet

func BTCAlphabet

func BTCAlphabet() Alphabet

func FlikrAlphabet

func FlikrAlphabet() Alphabet

func RippleAlphabet

func RippleAlphabet() Alphabet

type Encoder

type Encoder interface {
	Encode(in []byte) string
	Decode(str string) ([]byte, error)
}

Encoder - base58 encoder

func New

func New(alphabet Alphabet) Encoder

Jump to

Keyboard shortcuts

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