protected String encodeMetadata(String metadataToUse) {
        return Base64.getEncoder().encodeToString(metadataToUse.getBytes(StandardCharsets.UTF_8));
    }
<p>encodeMetadata.</p>

@param metadataToUse a {@link String} object
@return a {@link String} object
pac4j-saml/src/main/java/org/pac4j/saml/metadata/jdbc/SAML2JdbcMetadataGenerator.java