base58

package
v1.19.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT, ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChecksum = errors.New("checksum error")

ErrChecksum indicates that the checksum of a check-encoded string does not verify against the checksum.

View Source
var ErrInvalidFormat = errors.New("invalid format: version and/or checksum bytes missing")

ErrInvalidFormat indicates that the check-encoded string has an invalid format.

Functions

func CheckDecode

func CheckDecode(input string, vlen int, buf []byte) ([]byte, []byte, error)

CheckDecode decodes a string that was encoded with CheckEncode and verifies the checksum. adapted to support multi-length version strings

func CheckEncode

func CheckEncode(input []byte, version []byte) string

CheckEncode prepends a version byte and appends a four byte checksum.

func Decode

func Decode(b string, buf []byte) []byte

Decode decodes a modified base58 string to a byte slice.

func Encode

func Encode(b []byte) string

Encode encodes a byte slice to a modified base58 string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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