The Solution is shared considering CAN I SHARE MY SOLUTIONS?

Problem

Another common encoding scheme is Base64, which allows us to represent binary data as an ASCII string using 64 characters. One character of a Base64 string encodes 6 bits, and so 4 characters of Base64 encode three 8-bit bytes.

Base64 is most commonly used online, so binary data such as images can be easily included into HTML or CSS files.

Take the below hex string, decode it into bytes and then encode it into Base64.

72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf

Solution

Python:

1
2
3
4
import base64
given = '72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf'
given_bytes = bytes.fromhex(given)
base64.b64encode(given_bytes).decode()

FLAG := crypto/Base+64+Encoding+is+Web+Safe/