public void encryptFile(String filePath, byte[][][] subKeys) {
        System.out.println();
        System.out.println("Encrypting Async");

        try {
            final File inputFile = new File(filePath);
            final File outputFile = new File(filePath + ".des");
            final InputStream inputStream = new BufferedInputStream(new FileInputStream(inputFile));
            final OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(outputFile));

            final List<Future<byte[]>> futures = new ArrayList<>();
            final ExecutorService executor = Executors.newFixedThreadPool(4);

            final long nbBytesFile = inputFile.length();
            final long nbTotalBlocks = (long) Math.ceil(nbBytesFile / (double) BLOCK_SIZE_IN_BYTES);
            final int nbBytesPaddingNeeded = (int) (BLOCK_SIZE_IN_BYTES - (nbBytesFile % BLOCK_SIZE_IN_BYTES));

            final byte header = (byte) nbBytesPaddingNeeded;
            outputStream.write(header);

            long before = System.nanoTime();

            byte[] block = new byte[BLOCK_SIZE_IN_BYTES];
            int bytesRead = 0;
            for (int nbBlocks = 1; nbBlocks <= nbTotalBlocks; nbBlocks++) {

                bytesRead = inputStream.read(block);

                final byte[] finalBlock = block;
                //System.out.println("Encrypting block async " + nbBlocks);
                futures.add(CompletableFuture.supplyAsync(() -> {
                    return DesAlgorithm.encryptBlock(finalBlock, subKeys);
                }, executor).exceptionally(ex -> {
                    throw (RuntimeException) ex;
                }));

                block = new byte[BLOCK_SIZE_IN_BYTES];
            }
            inputStream.close();

            System.out.println("Done setting tasks");
            long afterTasks = System.nanoTime();

            futures.stream().forEachOrdered(encryptedBlock -> {
                try {
                    outputStream.write(encryptedBlock.get());
                    //System.out.println("Blok weggeschreven");
                } catch (InterruptedException | ExecutionException | IOException e) {
                    throw new RuntimeException(e);
                }
            });

            long afterWriting = System.nanoTime();
            System.out.println("Done writing to file");

            System.out.println("Setting tasks " + (afterTasks - before) + " Writing " + (afterWriting - afterTasks));
            
            ConsoleHelper.appendSuccess("Writing encrypted file to: " + outputFile.getPath());
            outputStream.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }