public static void main(String[] args) throws Exception{
		
		/**
		 * test for g function
		 * */
		long val = 0, x = 1, times = 1000;
		Timer timer = new Timer();
		timer.reset();
		Gfunction gf = null;
		for(int i = 0 ; i < times; i ++){
			gf = new Gfunction(i, 2);
		}
		timer.stop();
		System.out.println("Generator:\t" + timer.timeElapseinMs() / times + "ms");
		byte[]  vo = null;
		gf = new Gfunction(val, 2);
		for(int i = 0 ; i < times; i ++){
			vo = gf.prepareValueLessThan(x);
		}
		timer.stop();
		System.out.println("SP consume:\t" + timer.timeElapseinMs() / times + "ms");
		
		timer.reset();
		for(int i = 0 ; i < times; i ++){
			if(Gfunction.verifyValueLessThan(vo, x) == true){
				//System.out.println("Pass verification!");
			}else {
				System.out.println("Fail verification U - x!");
				break;
			}
		}
		System.out.println("Client consume:\t" + timer.timeElapseinMs() / times + "ms");
		// 33476, 14519
		val = 33476; 
		x = 14519;
		gf = new Gfunction(val, 2);
		vo = gf.prepareValueGreaterThan(x);
		for(int i = 0 ; i < times; i ++){
			if(Gfunction.verifyValueGreaterThan(vo, x) == true){
				//System.out.println("Pass verification!");
			}else {
				System.out.println("Fail verification x - L!");
				break;
			}
		}
		
		/**
		 * test file in and file out
		 * */
		DataOutputStream dos = new DataOutputStream(new FileOutputStream(new File("./database/gf")));
		for (int i = 0; i < 1; i ++) {
			gf.write(dos);
		}
		dos.flush();
		dos.close();
		DataInputStream dis = new DataInputStream(new FileInputStream(new File("./database/gf")));
		gf.read(dis);
		dis.close();
	}