cybersecurity · beginner · ~15 min
Compute the padded base64 output size.
Implement int base64_len(int n) returning the length of the base64 encoding of n input bytes: 4 * ceil(n / 3) = 4 * ((n + 2) / 3).
int base64_len(int n) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.