Documentation
¶
Overview ¶
Package base92 fork from https://github.com/teal-finance/BaseXX with customizable encoding alphabet.
Index ¶
Constants ¶
View Source
const (
Radix = 92 // approximation of ceil(log(256)/log(base)).
)
Variables ¶
View Source
var StdEncoding = NewEncoding(alphabet)
StdEncoding is the default encoding enc.
Functions ¶
This section is empty.
Types ¶
type Encoding ¶
Encoding alphabet is an optimized form of the encoding characters.
func NewEncoding ¶
NewEncoding creates a new alphabet mapping.
It panics if the passed string does not meet all requirements: its length (in bytes) must be the same as the base, all runes must be valid ASCII characters, and all characters must be different. Encoder string with non-printable characters are accepted.
func (*Encoding) DecodeString ¶
DecodeString decodes a Base92 string into binary bytes.
func (*Encoding) EncodeToString ¶
EncodeToString encodes binary bytes into Base92 bytes.
Click to show internal directories.
Click to hide internal directories.