You are given the following four bytes: 10100011 00110111 11101001 10101011…
2007
You are given the following four bytes:
10100011 00110111 11101001 10101011
which of the following are substrings of the base 64 encoding of the above four bytes?
- A.
zdp
- B.
fpq
- C.
qwA
- D.
oze
Attempted by 17 students.
Show answer & explanation
Correct answer: B
First, convert the four bytes to their hexadecimal representation: A3 37 E9 AB. Base64 encoding processes data in groups of three bytes. The first group (A3 37 E9) encodes to 'ozfp'. The remaining byte (AB) is padded, encoding to 'qw=='. Concatenating these gives the full Base64 string: 'ozfpqw=='. Checking for substrings, we see that 'fpq' appears starting at index 2 (spanning the end of the first block and start of the second).
A video solution is available for this question — log in and enroll to watch it.