internal: optimize base64 and base32hex