Since 1980 this has been available https://en.wikipedia.org/wiki/Uuencoding
busybox has a version https://www.busybox.net/downloads/BusyBox.html#uuencode with base64 support:
uuencode [-m] [infile] stored_filename
Uuencode a file to stdout
Options:
-m Use base64 encoding per RFC1521
Usage examples:
$ echo 'foo' | uuencode -m -
begin-base64 644 -
Zm9vCg==
====
And to confirm it's correct using other tools:
$ echo 'foo' | b64encode -
begin-base64 644 -
Zm9vCg==
====
$ python3 -c 'import base64; print(base64.b64encode(b"foo\n"))'
b'Zm9vCg=='