1

我正在用 Botan 解密一些文件,如下所示:

std::ifstream in (InFilename.c_str(), std::ios::binary);
in.ignore(32);
std::ofstream out (outFilename.c_str(), std::ios::binary);
Pipe pipe(get_cipher("AES-256/CBC",key,iv, DECRYPTION),new DataSink_Stream(out));
try{
pipe.start_msg();
in >> pipe;
pipe.end_msg();
out.flush();
out.close();
in.close();

在我收到信号后,该文件被解密,我像 pdf 一样打开这个文件:

pdf->openFile(outFilename);

一切都完美而快速。但是位于同一文件夹中的解密文件,我想解密内存中的文件,例如内存映射文件并将其直接发送到 openFile 而不保存在文件系统中。我怎样才能做到这一点?Qt 和 Core C++ 可能有很多不同的可能性。谢谢!

4

0 回答 0