(base64_encode): bound input length to /4 of max int and positive