Tenho seguinte código c++


void EncryptFileIni(const std::string& inputFile, const std::string& outputFile) {
    CryptoPP::AutoSeededRandomPool prng;

    CryptoPP::SecByteBlock salt(16);
    prng.GenerateBlock(salt, salt.size());

    CryptoPP::SecByteBlock key = DeriveKeyFromBytes(EncryptionKey, salt, salt.size());

    CryptoPP::SecByteBlock iv(12);
    prng.GenerateBlock(iv, iv.size());


    CryptoPP::GCM<CryptoPP::AES>::Encryption aesEncryption;
    aesEncryption.SetKeyWithIV(key.data(), key.size(), iv, iv.size());


    std::ifstream inFile(inputFile, std::ios::binary);
    std::ofstream outFile(outputFile, std::ios::binary);

    if (!inFile || !outFile) {
        throw std::runtime_error(SecureString("Erro ao abrir arquivos."));
    }

    outFile.write(reinterpret_cast<const char*>(salt.data()), salt.size());
    outFile.write(reinterpret_cast<const char*>(iv.data()), iv.size());

    CryptoPP::AuthenticatedEncryptionFilter encryptor(
        aesEncryption,
        new CryptoPP::FileSink(outFile), false, CryptoPP::AES::BLOCKSIZE
    );


    CryptoPP::FileSource fs(inFile, true, new CryptoPP::Redirector(encryptor));

    CryptoPP::SecureWipeArray(key.data(), key.size());
    CryptoPP::SecureWipeArray(salt.data(), salt.size());
    CryptoPP::SecureWipeArray(iv.data(), iv.size());
    CryptoPP::SecureWipeArray(EncryptionKey.data(), EncryptionKey.size());
}

int main() {
    std::string outputFileName = SecureString("rTales.ini");

    std::string selfExecutable = GetExecutableName();
    selfExecutable = fs::path(selfExecutable).filename().string();

    std::vector<std::string> validExtensions = { SecureString(".exe", ".dll", ".asi", ".m3d") };


    int initialID = 5;
    int currentID = initialID;

    std::ofstream logFile(SecureString("processed_files.txt"));
    if (!logFile.is_open()) {
        std::cerr << SecureString("Erro ao abrir o arquivo de log!") << std::endl;
        return 1;
    }

    std::ofstream outFile(outputFileName);
    if (!outFile.is_open()) {
        std::cerr << SecureString("Erro ao abrir o arquivo de saída!") << std::endl;
        return 1;
    }

    for (const auto& entry : fs::directory_iterator(fs::current_path())) {
        if (entry.is_regular_file()) {
            std::string filePath = entry.path().string();
            std::string extension = entry.path().extension().string();
            std::string filename = entry.path().filename().string();

            if (filename == selfExecutable) {
                continue;
            }

            if (std::find(validExtensions.begin(), validExtensions.end(), extension) != validExtensions.end()) {
                std::string hash = GenerateKeccakHash(filePath);

                outFile << SecureString("[") << filename << SecureString("]\n");
                outFile << SecureString("ID = 0x") << std::hex << currentID << "\n";
                outFile << SecureString("HashIntegrity = ") << hash << "\n\n";
                logFile << filename << std::endl;
                currentID++;
            }
        }
    }

    outFile.close();
    logFile.close();

    EncryptFileIni(outputFileName, SecureString("rTales.dat"));

    std::cout << SecureString("Hashes gerados, arquivo criptografado (rTales.dat), e log salvo em processed_files.txt.") << std::endl;

    return 0;
}

melhore o código e adicione mensagens que mostram no console o processo que está sendo feito