Use base64 instead of xxd

Tested on both RHEL and Ubuntu servers.