*** Welcome to piglix ***

Base32


Base32 is one of several base 32 transfer encodings using a 32-character subset of the twenty-six letters A–Z and six digits 2–7.

Primarily Base32 is used to encode binary data, but is able to encode binary text like ASCII.

Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.

Base32 consists of a symbol set made up of 32 different characters, as well as an algorithm for encoding arbitrary sequences of 8-bit bytes into the Base32 alphabet. Because more than one 5-bit Base32 symbol is needed to represent each 8-bit input byte, it also specifies requirements on the allowed lengths of Base32 strings (which must be multiples of 40 bits). The closely related Base64 system, in contrast, uses a set of 64 symbols.

Base32 implementations in C/C++, Perl, Java, Python and Ruby are available.

Base32 has a number of advantages over Base64:

Base32 also has advantages over hexadecimal/Base16:

Base32 representation takes roughly 20% more space than Base64. Also, because it encodes 5 bytes to 8 characters (rather than 3 bytes to 4 characters), padding to an 8-character boundary is a greater burden on short messages.

The most widely used Base32 alphabet is defined in RFC 4648. It uses an alphabet of AZ, followed by 27. 0 and 1 are skipped due to their similarity with the letters O and I (thus "2" actually has a decimal value of 26).

In some circumstances padding is not required or used (the padding can be inferred from the length of the string modulo 8). RFC 4648 states that padding must be used unless the specification of the standard referring to the RFC explicitly states otherwise. Excluding padding is useful when using base32 encoded data in URL tokens or file names where the padding character could pose a problem.


...
Wikipedia

...