public void decrypt(File file){
    	try{
    		byte[] cipherlesssalt = new byte[(int) file.length() - 8];
    		byte[] ciphertext = new byte[(int) file.length()];
    		byte[] filesalt = new byte[8];
    		FileInputStream fileInputStream = new FileInputStream(file);
    		fileInputStream.read(ciphertext);
    		System.arraycopy(ciphertext, 0, filesalt, 0, 8);
    		System.arraycopy(ciphertext, 8, cipherlesssalt, 0, cipherlesssalt.length);
    		pbeParamSpec = new PBEParameterSpec(filesalt, count);
    		

    		// Prompt user for encryption password.
    		// Collect user password as char array (using the
    		// "readPasswd" method from above), and convert
    		// it into a SecretKey object, using a PBE key
    		// factory.
    		System.out.print("Enter decryption password:  ");
    		System.out.flush();
    		pbeKeySpec = new PBEKeySpec(readPasswd(System.in));
    		keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndTripleDES");
    		SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
	
    		// Create PBE Cipher
    		Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndTripleDES");
    		
    		// Initialize PBE Cipher with key and parameters
    		pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
		
    		byte[] clearMAC = pbeCipher.doFinal(cipherlesssalt);
    		byte[] MAC = new byte[16];
    		byte[] cleartext = new byte[clearMAC.length - 16];
    		System.arraycopy(clearMAC, clearMAC.length - 16, MAC, 0, 16);
    		System.arraycopy(clearMAC, 0, cleartext, 0, clearMAC.length - 16);
    		
    		Mac mac = Mac.getInstance("HmacMD5");
			mac.init(pbeKey);
			byte[] digest = mac.doFinal(cleartext);
			String expectedMAC = javax.xml.bind.DatatypeConverter.printBase64Binary(digest);
			String actualMAC = javax.xml.bind.DatatypeConverter.printBase64Binary(MAC);
			if (expectedMAC.equals(actualMAC)) {
			} else {
				System.out
						.println("File has been altered, things are unsafe yo.");
				System.exit(1);
			}
    		
    		File newFile = new File("C:/Users/Andrew/Desktop/DecryptedTest.txt");
    		newFile.createNewFile();
    		FileOutputStream fos = new FileOutputStream("C:/Users/Andrew/Desktop/DecryptedTest.txt");
    		fos.write(cleartext);
    		fos.close();
    	} catch (IOException i) {
    		System.out.println(i);
    	} catch (NoSuchAlgorithmException n){
    		System.out.println(n);
    	} catch (InvalidKeySpecException k) {
    		System.out.println(k);
    	} catch (NoSuchPaddingException p){
    		System.out.println(p);
    	} catch (InvalidAlgorithmParameterException a){
    		System.out.println(a);
    	} catch (InvalidKeyException k){
    		System.out.println(k);
    	} catch (BadPaddingException p){
    		System.out.println(p);
    	} catch (IllegalBlockSizeException b){
    		System.out.println(b);
    	}
    }