实现了 RFC 4648 定义的 base32 编码
RFC 4648 定义的标准 base32 编码
var StdEncoding = NewEncoding(encodeStd)
RFC 4648 里定义的 “Extended Hex Alphabet”, 一般用于 DNS
var HexEncoding = NewEncoding(encodeHex)
- func NewDecoder(enc *Encoding, r io.Reader) io.Reader
- func NewEncoder(enc *Encoding, w io.Writer) io.WriteCloser
- func NewEncoding(encoder string) *Encoding
- func (enc *Encoding) Decode(dst, src []byte) (n int, err error)
- func (enc *Encoding) DecodeString(s string) ([]byte, error)
- func (enc *Encoding) DecodedLen(n int) int
- func (enc *Encoding) Encode(dst, src []byte)
- func (enc *Encoding) EncodeToString(src []byte) string
- func (enc *Encoding) EncodedLen(n int) int