public FileEncryptor() {
		// find relative folder tmp
		saveDir = new File("tmp/");
		// if not exist create one
		if (!saveDir.isDirectory())
			saveDir.mkdir();
		// if the defaultkey hasn't been created, create one
		if (FileEncryptor.defaultKey == null) {
			try {
				KeyGenerator keyGen = KeyGenerator.getInstance("AES");
				keyGen.init(128);
				FileEncryptor.defaultKey = (SecretKeySpec) keyGen.generateKey();
			} catch (NoSuchAlgorithmException e) {
				System.out.println(e.getMessage());
			}
		}
		// if the cypher is not available create one
		if (cypher == null) {
			try {
				cypher = Cipher.getInstance("AES");
			} catch (NoSuchAlgorithmException e) {
				System.out.println(e.getMessage());
			} catch (NoSuchPaddingException e) {
				System.out.println(e.getMessage());
			}
		}

	}