Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Bitcoin = NewEncoding("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") Flickr = NewEncoding("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ") )
Functions ¶
func EncodedLen ¶ added in v1.0.2
EncodedLen returns the encoded len for a given buffer, checking it for initial zeroes. It can be higher than needed.
func EncodedMaxLen ¶ added in v1.0.2
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
Click to show internal directories.
Click to hide internal directories.