class CodeGenerator {

    public static String getRandomUrlToken()
    {
        SecureRandom sr = new SecureRandom();
        byte[] tokenBytes = new byte[ URL_RANDOM_TOKEN_LENGTH ];
        sr.nextBytes( tokenBytes );

        return Base64Utils.encodeToUrlSafeString( tokenBytes );
    }

}