public static byte[] encodeBase64ToByteArray(final byte[] data) {
        return Base64.encodeBase64(data);
    }
Base64-encode the given byte[] as a byte[].

@param data the byte array to encode
@return the byte[] in base64
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java