This snippet of Java code will encrypt the variables and values string into the required format.

You need to generate the string and pass it into this function.
Example, pass it the string:


It will return:


Then put this in the CDN URL:

Or for Real Time Zone


The Code

import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

public class EncryptedLinksClass {

    public static void main(String[] args) {
        try {
        } catch (Exception e) {
            System.out.println("error: " + e.toString());

    public static String encrypt(String plaintext)
            throws NoSuchAlgorithmException, NoSuchPaddingException,
            InvalidKeyException, InvalidAlgorithmParameterException,
            IllegalBlockSizeException, BadPaddingException {

        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
        MessageDigest md = MessageDigest.getInstance("MD5");
        String key = "YourKeyGoesHere";

        byte[] key_md5 = md.digest(key.getBytes());
        SecretKeySpec keyspec = new SecretKeySpec(key_md5, "AES");

        byte[] iv = joinByteArray(key_md5, key.getBytes());
        byte[] iv_md5 = md.digest(iv);
        IvParameterSpec ivspec = new IvParameterSpec(iv_md5);

        cipher.init(Cipher.ENCRYPT_MODE, keyspec, ivspec);
        byte[] encrypted = cipher.doFinal(plaintext.getBytes());
        return bytesToHex(encrypted);

    public static String bytesToHex(byte[] bytes) {
        StringBuilder builder = new StringBuilder();
        for (byte b : bytes) {
            builder.append(String.format("%02x", b));
        return builder.toString();

    public static byte[] joinByteArray(byte[] a, byte[] b) {
        int aLen = a.length;
        int bLen = b.length;
        byte[] c = new byte[aLen + bLen];
        System.arraycopy(a, 0, c, 0, aLen);
        System.arraycopy(b, 0, c, aLen, bLen);
        return c;