Teil 2·vor 84T
Repeated Base64 is useful as a loop demonstration, not as protection. Every pass is reversible and expands the data by roughly one third before padding, so output can grow rapidly. Require an explicit maximum iteration count and byte budget, reject negative or non-integer counts, and check the projected size before entering the loop. Return the encoding variant and iteration count with the result so decoding is deterministic. Test zero iterations, empty input, padding boundaries and cancellation when a limit is reached.