Documentation ¶
Overview ¶
Package base32 implements the conversion for bytes (base256) to base32.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidLength reports an attempt to decode an input of invalid length. ErrInvalidLength = errors.New("invalid length") // ErrNonZeroPadding reports an attempt to decode an input without zero padding. ErrNonZeroPadding = errors.New("non-zero padding") )
Functions ¶
func Decode ¶
Decode decodes src into DecodedLen(len(src)) bytes, returning the actual number of bytes written to dst. If the input is malformed, Decode returns an error and the number of bytes decoded before the error.
func DecodedLen ¶
DecodedLen returns the maximum length in bytes of the decoded data corresponding to n base32-encoded values.
func Encode ¶
Encode encodes src into EncodedLen(len(src)) digits of dst. As a convenience, it returns the number of digits written to dst, but this value is always EncodedLen(len(src)). Encode implements base32 encoding.
func EncodedLen ¶
EncodedLen returns the length of the base32 encoding of an input buffer of length n.
Types ¶
type CorruptInputError ¶
type CorruptInputError struct { Offset int // error occurred after reading Offset bytes // contains filtered or unexported fields }
A CorruptInputError is a description of a base32 syntax error.
func (CorruptInputError) Error ¶
func (e CorruptInputError) Error() string
func (CorruptInputError) Unwrap ¶
func (e CorruptInputError) Unwrap() error