| 1 |
base32: RFC 4648 base32 encoding support |
| 2 |
|
| 3 |
A stream-based encoding and decoding interface is available via [[newencoder]] |
| 4 |
and [[newdecoder]], which transparently encode or decode bytes to or from base32 |
| 5 |
when writing to or reading from an underlying I/O handle. |
| 6 |
|
| 7 |
Convenience functions for encoding to or decoding from a byte slice or a string |
| 8 |
are also available; see [[encodeslice]], [[decodeslice]], [[encodestr]], and |
| 9 |
[[decodestr]]. These functions dynamically allocate their return values; use the |
| 10 |
stream interface if you require static allocation. |
| 11 |
|
| 12 |
Each function accepts the desired base32 encoding alphabet as its first |
| 13 |
argument. [[std_encoding]] and [[hex_encoding]], as defined by the RFC, are |
| 14 |
provided for your convenience, but you may create your own encoding using |
| 15 |
[[encoding_init]]. |
| 16 |
|
| 17 |
Due to security concerns described by the RFC, this implementation rejects |
| 18 |
invalid padding. |
| 19 |
|
| 20 |
https://datatracker.ietf.org/doc/html/rfc4648#section-12 |