public static void main(String[] args)
	{
		 new CertificateAuthority();
		int errors = 0;

		for (int i = 0; i < 10; i++)
		{

			System.out.println("Test: " + (i + 1) + " ");
			try
			{
				Session session = new Session();
				session.getClient().clientHello();
			} catch (Exception e)
			{
				errors++;
				System.out.println(e);
			}
		}
		System.out.println(errors);

		for (int i = 0; i < 10; i++)
		{
			System.out.println("Test: " + (i + 1) + " ");
			try
			{
				BigInteger x = Generator.rand();
				BigInteger y = Generator.rand();
				BigInteger z = Generator.preMasterSecret(x, y);
				BigInteger a = Generator.masterSecret(x, y, z);

				String s = "Hello123";
				String s2 = Generator.DESEncryption(s, a);
				String s3 = Generator.DESDecryption(s2, a);
				System.out.println("plain: " + s);
				System.out.println("enc: " + s2);
				System.out.println("DEC: " + s3);
			} catch (Exception e)
			{
				System.out.println(e);
			}
		}
		
		try
		{
			System.out.println("test " + (count + 1) + ": ");
			BigInteger[] keys = Generator.generateKeys();
			String text = "Hi";
			byte[] b = text.getBytes();
			String encode = Generator.encrypt(keys[0], keys[1], text);
			String text2 = Generator.decrypt(keys[0], keys[2], encode);

			System.out.println(text2);
		} catch (Exception e)
		{
			count++;
			System.out.println(e);
			main(args);
		}

		System.out.println(new BigInteger("151300").bitCount());
		
		String s = "The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over the lazy dog";
		s += " The brown fox jumped over t";
		System.out.println(s.length());
		BigInteger[] keys = Generator.generateKeys();
		String enc = Generator.encrypt(keys[0], keys[1], s);
		String dec = Generator.decrypt(keys[0], keys[2], enc);
		System.out.println(s);
		System.out.println(enc);
		System.out.println(dec);
		BigInteger c = Generator.rand();
		BigInteger b = Generator.rand();
		BigInteger pms = Generator.preMasterSecret(c, b);
		BigInteger master = Generator.masterSecret(c, b, pms);
		
		String des1 = Generator.DESEncryption(s, master);
		String des2 = Generator.DESDecryption(des1, master);
		System.out.println(s.equals(des2));
		
		HackedSession hack = new HackedSession();
		hack.getClient().clientHello();
		
		System.out.println(Integer.MAX_VALUE);
		
		String s1 = "Hello Rapha";
		String sald = "raph";
		String salt2 = Generator.md5Hash(sald+s1);
		String s2= Generator.md5Hash(s1);
		System.out.println(s2);
		System.out.println(salt2);
		
		Generator.encryptFile(master);
		Generator.decryptFile(master);
	}