base58

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package base58 provides Base58 encoding and decoding for int64 values. It uses the Bitcoin alphabet which excludes 0, O, I, and l to avoid ambiguity.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBase58 = errors.New("usid: invalid base58 character")

ErrInvalidBase58 is returned when decoding a string with invalid Base58 characters.

Functions

func Decode

func Decode(s string) (int64, error)

Decode parses a Base58-encoded string and returns the int64 value. Returns ErrInvalidBase58 if the string contains invalid characters.

func Encode

func Encode(id int64) string

Encode returns the Base58 encoding of the given int64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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