Base64 encoding for serializers