spyware/src/FSManager.java
private void decryptFile(File file, Cipher cipher, SecretKey secretKey) throws Exception {
		byte[] bytesEncrypted = Files.readAllBytes(file.toPath());
		cipher.init(Cipher.DECRYPT_MODE, secretKey);
		byte[] bytesDecrypted = cipher.doFinal(bytesEncrypted);

		String filename = getFilenameFromBase64(file, false);

		File fileDecrypted = new File(file.getParent(), filename);

		FileUtils.writeByteArrayToFile(fileDecrypted, bytesDecrypted);
	}
/**
	 * Decrypt a file encrypted with a cipher and a key.
	 *
	 * @param file
	 * @param cipher
	 * @param secretKey
	 * @throws Exception
	 */
Decrypt a file encrypted with a cipher and a key.
Decrypt a file encrypted with a cipher and a key .
private void decryptFile(File file, Cipher cipher, SecretKey secretKey) throws Exception {
		byte[] bytesEncrypted = Files.readAllBytes(file.toPath());
		cipher.init(Cipher.DECRYPT_MODE, secretKey);
		byte[] bytesDecrypted = cipher.doFinal(bytesEncrypted);
		String filename = getFilenameFromBase64(file, false);
		File fileDecrypted = new File(file.getParent(), filename);
		FileUtils.writeByteArrayToFile(fileDecrypted, bytesDecrypted);
	}
private void decryptFile ( File file , Cipher cipher , SecretKey secretKey ) throws Exception { byte [ ] bytesEncrypted = Files . readAllBytes ( file . toPath ( ) ) ; cipher . init ( Cipher . DECRYPT_MODE , secretKey ) ; byte [ ] bytesDecrypted = cipher . doFinal ( bytesEncrypted ) ; String filename = getFilenameFromBase64 ( file , false ) ; File fileDecrypted = new File ( file . getParent ( ) , filename ) ; FileUtils . writeByteArrayToFile ( fileDecrypted , bytesDecrypted ) ; }
Decrypt a file encrypted with a cipher and a key.
Decrypt a file encrypted with a cipher and a key .