base58

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrChecksum = errors.New("校验和错误")

ErrChecksum 表示校验编码字符串的校验和不与校验和进行验证。

View Source
var ErrInvalidFormat = errors.New("格式无效:版本和/或校验和字节丢失")

ErrInvalidFormat 表示校验编码字符串的格式无效。

Functions

func CheckDecode

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

CheckDecode 解码使用 CheckEncode 编码的字符串并验证校验和。

func CheckEncode

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

CheckEncode 前置一个版本字节并附加一个四字节校验和。

func Decode

func Decode(b string) []byte

Decode 将修改后的 base58 字符串解码为字节切片。

func Encode

func Encode(b []byte) string

Encode 将字节切片编码为修改后的 base58 字符串。

Types

This section is empty.

Jump to

Keyboard shortcuts

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