Base32 Encoding of data involves the substitution of every 5 bits of the original data with an 8 bit pattern that will survive transportation through systems or protocols which have special restrictions on the range of characters they will accept and emerge unmodified. Similarly, Base64 encoding involves substitution of 6 bit groups instead of 5, thus being space-wise more efficient.
Your task is to convert a given Base32 Encoded String into a Base64 Encoded one.
The exact details of the two processes can be obtained from RFC 4648, under Section 4: Base 64 Encoding and Section 6: Base 32 Encoding.
- Each line of input consists of a single Base32 encoded string.
- For each input line, output a line that consists of the Base64 encoded version of the same string.
- The length of the actual string is never greater than 1000.
- There is no restriction on the characters that can appear appear in the actual string.
Problem Setter: Kaustubh Karkare