base58

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StdEncoding base58 standard encoder.
	StdEncoding = MustNewEncoder(StdSource())
)

Functions

func StdSource

func StdSource() string

StdSource returns base58 standard source string.

Types

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

Encoder base58 encoder.

func MustNewEncoder

func MustNewEncoder(source string) *Encoder

MustNewEncoder must new a base58 encoder.

func NewEncoder

func NewEncoder(source string) (*Encoder, error)

NewEncoder new a base58 encoder.

func (*Encoder) Decode

func (enc *Encoder) Decode(id string) (int64, error)

Decode base58 decodes a string id.

func (*Encoder) Encode

func (enc *Encoder) Encode(id int64) string

Encode base58 encodes a int64 id.

Jump to

Keyboard shortcuts

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