private static void encryption() {

		boolean e_loop = true;
		// default file names
		String fn= "pic", fex=".jpg";
		
		do {
			System.out.println("\n\n\n+==+ ENCRYPTION +==+ \n\n"+
								"-- 1 - Begin encryption -- \n"+
								"-- 2 - Change file name. (Currently:" +fn+fex+") -- \n"+
								"-- 3 - Go back -- \n");
			
			// take input
			layer_2 = user_input.next();
			switch(layer_2) {
				
				// Begin encryption
				case "1":
					
					final long startTimeEncr = System.currentTimeMillis();

					Encryption encr = new Encryption("rsa_public_key.txt");
					
					encr.encrypt(fn+fex, fn+"_fresh.encrypted");
					
					final long endTimeEncr = System.currentTimeMillis();

					System.out.println("Total encryption time: " + (endTimeEncr - startTimeEncr) );

					break;
					
				// Go back
				case "2": 
					boolean kbl_loop;	// loops until valid input is given

					
					System.out.println("Enter file name, hit enter and then write the file format (eg. .txt):");
					
					do{
						try {
							fn=user_input.next();
							fex = user_input.next();
							kbl_loop = false;
						}
						catch(Exception excptn) {
							System.out.println("Error: not an integer!\n"+
												"Try again: ");
							kbl_loop = true;
						}
					}while(kbl_loop);
					
					break;
				case "3":
					e_loop = false;
					break;
			}
			
		} while(e_loop);
	}