base58

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package base58 implements base58 encoding and decoding.

Index

Constants

View Source
const (
	ChecksumLen int = 4
	VersionLen  int = 1
)
View Source
const (
	Alphabet string = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
)

Variables

View Source
var (
	ErrChecksumMismatch = errs.New("checksum mismatch")
	ErrInvalidLength    = errs.New("decoded input too short for Base58")
)

Functions

func Decode

func Decode(s Base58) []byte

Types

type Base58

type Base58 string

func CheckEncode

func CheckEncode(input []byte, version VersionPrefix) Base58

func Encode

func Encode(data []byte) Base58

func (Base58) Equal

func (b Base58) Equal(other Base58) bool

type Checksum

type Checksum [ChecksumLen]byte

func DeriveChecksum

func DeriveChecksum(input []byte) (cksum Checksum)

func (Checksum) Equal

func (c Checksum) Equal(other Checksum) bool

type VersionPrefix

type VersionPrefix byte

func CheckDecode

func CheckDecode(input Base58) (result []byte, version VersionPrefix, err error)

Jump to

Keyboard shortcuts

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