Home | History | Annotate | Download | only in base32

Lines Matching refs:Encoding

5 // Package base32 implements base32 encoding as specified by RFC 4648.
19 // An Encoding is a radix 32 encoding/decoding scheme, defined by a
20 // 32-character alphabet. The most common is the "base32" encoding
22 // The alternate "base32hex" encoding is used in DNSSEC.
23 type Encoding struct {
31 // NewEncoding returns a new Encoding defined by the given alphabet,
33 func NewEncoding(encoder string) *Encoding {
34 e := new(Encoding)
45 // StdEncoding is the standard base32 encoding, as defined in
64 // Encode encodes src using the encoding enc, writing
67 // The encoding pads the output to a multiple of 8 bytes,
70 func (enc *Encoding) Encode(dst, src []byte) {
135 // EncodeToString returns the base32 encoding of src.
136 func (enc *Encoding) EncodeToString(src []byte) string {
144 enc *Encoding
216 func NewEncoder(enc *Encoding, w io.Writer) io.WriteCloser {
220 // EncodedLen returns the length in bytes of the base32 encoding
222 func (enc *Encoding) EncodedLen(n int) int { return (n + 4) / 5 * 8 }
238 func (enc *Encoding) decode(dst, src []byte) (n int, end bool, err error) {
265 // valid dlen values. See RFC 4648 Section 6 "Base 32 Encoding" listing
316 // Decode decodes src using the encoding enc. It writes at most
321 func (enc *Encoding) Decode(dst, src []byte) (n int, err error) {
328 func (enc *Encoding) DecodeString(s string) ([]byte, error) {
337 enc *Encoding
420 func NewDecoder(enc *Encoding, r io.Reader) io.Reader {
426 func (enc *Encoding) DecodedLen(n int) int { return n / 8 * 5 }