Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Bitcoin = NewEncoding("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") Flickr = NewEncoding("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ") )
View Source
var ( ErrZeroLength = errors.New("base58: cannot decode zero length string") ErrNonAscii = errors.New("base58: cannot decode non-ASCII input") ErrBadDigit = errors.New("base58: cannot decode unsupported digit") ErrInvalidBlockLength = errors.New("base58: invalid block length") ErrOverflow = errors.New("base58: decoded value overflows block size") )
Functions ¶
func EncodedLen ¶
EncodedLen returns the encoded len for a given buffer, checking it for initial zeroes. It can be higher than needed.
func EncodedMaxLen ¶
EncodedMaxLen return the maximum encoded len for an input of ln bytes. If it starts with zeroes the actual len will be shorter
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
func NewEncoding ¶
NewEncoding returns a encoding structure initialized for decoding/encoding using the passed parameter
It panics if the passed string is not 58 bytes long or isn't valid ASCII.
func (*Encoding) Decode ¶
Decode will decode the provided string using the current encoding and return a byte array of the value, or an error if the input was not valid
func (*Encoding) Encode ¶
Encode will encode the provided byte array into a base58 encoded string using the current encoding.
func (*Encoding) EncodeChunked ¶
Click to show internal directories.
Click to hide internal directories.