What is base32
Base32 is a number system that uses a set of 32 digits. Every number can be represented by 5 bits means (25). By using 32 character set Base32 is can be represented in a human-readable format.
In the 32-character set, there are 26 upper case letters (A-Z) and (2-7) numbers.
Base32 messages have multiple of 8 characters. So (=) equal symbol is used as the last character to make it multiple of 8.
“JJXWQ3RAIRXWK”(13) Now Add “===”(3) Final Result: JJXWQ3RAIRXWK===(16)
Example Base32 Encode:
John Doe
Base32 Encoded Result:
JJXWQ3RAIRXWK===
In this example, the Base32 has only 13 character set. This is not multiple of 8. So there = (Equal Symbol) to be added to make it multiple of 8.
How to encode Base32 Complete Procedure
In base32 the data message for encoding is first treated as Binary Number System according to a predefined coding such as ASCII or Unicode. There are 8 Bit sets in Binary Number.
Example: John Doe to Base32 Encryption
Step 1: John Doe to Binary 8 bit Conversion
01001010 01101111 01101000 01101110 00100000 01000100 01101111 01100101
Step 2: Now the sets are break into 5 bits and left digits are filled by 0 to complete the pair of 5 bits.
01001 01001 10111 10110 10000 11011 10001 00000 01000 10001 10111 10110 01010
Step 3: Now these 5 bits pairs are converted into Base32 as the below table.
Conversion Table Binary to Base32 Encode
Binary | Decimal | Base32 |
---|---|---|
00000 | 0 | A |
00001 | 1 | B |
00010 | 2 | C |
00011 | 3 | D |
00100 | 4 | E |
00101 | 5 | F |
00110 | 6 | G |
00111 | 7 | H |
01000 | 8 | I |
01001 | 9 | J |
01010 | 10 | K |
Binary | Decimal | Base32 |
---|---|---|
01011 | 11 | L |
01100 | 12 | M |
01101 | 13 | N |
01110 | 14 | O |
01111 | 15 | P |
10000 | 16 | Q |
10001 | 17 | R |
10010 | 18 | S |
10011 | 19 | T |
10100 | 20 | U |
10101 | 21 | V |
Binary | Decimal | Base32 |
---|---|---|
10110 | 22 | W |
10111 | 23 | X |
11000 | 24 | Y |
11001 | 25 | Z |
11010 | 26 | 2 |
11011 | 27 | 3 |
11100 | 28 | 4 |
11101 | 29 | 5 |
11110 | 30 | 6 |
11111 | 31 | 7 |
Conversion According to Base32 Table
Binary | 01001 | 01001 | 10111 | 10110 | 10000 | 11011 | 10001 | 00000 | 01000 | 10001 | 10111 | 10110 | 01010 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Base32 | J | J | X | W | Q | 3 | R | A | I | R | X | W | K |
According to charge we get JJXWQ3RAIRXWK(13 characters) and Base32 must have multiple of 8 characters. To make it complete. We add === symbol three times to make it multiple of 8 characters.
Now the Base32 Encoded Result of John Doe: "JJXWQ3RAIRXWK==="