Documentation ¶
Overview ¶
Package base62 implements base62 encoding
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StdEncoding = NewStdEncoding()
StdEncoding is the standard base62 encoding
Functions ¶
func DecodeToBigInt ¶
DecodeToBigInt returns an arbitrary precision integer from the base62 encoded string using the StdEncoding
func DecodeToInt64 ¶
DecodeToInt64 decodes a base62 encoded string using the StdEncoding
func EncodeBigInt ¶
EncodeBigInt returns the base62 encoding of an arbitrary precision integer using the StdEncoding
func EncodeInt64 ¶
EncodeInt64 returns the base62 encoding of n using the StdEncoding
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
func NewEncoding ¶
NewEncoding returns a new Encoding defined by the given alphabet
func NewStdEncoding ¶
func NewStdEncoding() *Encoding
NewStdEncoding returns an Encoding preconfigured with the standard base62 alphabet
func (*Encoding) DecodeToBigInt ¶
DecodeToBigInt returns an arbitrary precision integer from the base62 encoded string
func (*Encoding) DecodeToInt64 ¶
DecodeToInt64 decodes a base62 encoded string
func (*Encoding) EncodeBigInt ¶
EncodeBigInt returns the base62 encoding of an arbitrary precision integer
func (*Encoding) EncodeInt64 ¶
EncodeInt64 returns the base62 encoding of n