static String encodeAttribute(final String s) {
        return ENCODED_ATTRIBUTE_PREFIX + new String(Hex.encodeHex(s.getBytes(StandardCharsets.UTF_8)));
    }
Encode attribute string.

@param s the s
@return the string
api/cas-server-core-api-services/src/main/java/org/apereo/cas/authentication/ProtocolAttributeEncoder.java