Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Base32, _ = NewEncoding("abcdefghjkmnpqrstvwxyz0123456789")
View Source
var Base62, _ = NewEncoding("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
Encoding is a custom base encoding defined by an alphabet. It should bre created using NewEncoding function
func NewEncoding ¶
NewEncoding returns a custom base encoder defined by the alphabet string. The alphabet should contain non-repeating characters. Ordering is important. Example alphabets:
- base2: 01
- base16: 0123456789abcdef
- base32: 0123456789ABCDEFGHJKMNPQRSTVWXYZ
- base62: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Click to show internal directories.
Click to hide internal directories.