本文介绍了如何保证在运行时解密的文件被清理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用C或C ++,将文件解密到磁盘后,如果应用程序崩溃或者系统关闭,并且无法正常清理,我该如何保证它被删除?在Windows和Linux上使用C或C ++?

解决方案

请勿将解密的文件完全写入磁盘。 >

如果系统电源关闭,文件仍然在磁盘上,磁盘,因此可以访问该文件。



例外是使用加密的文件系统,但这是您的程序无法控制的。


Using C or C++, After I decrypt a file to disk- how can I guarantee it is deleted if the application crashes or the system powers off and can't clean it up properly? Using C or C++, on Windows and Linux?

解决方案

Don't write the file decrypted to disk at all.

If the system is powerd off the file is still on disk, the disk and therefore the file can be accessed.

Exception would be the use of an encrypted file system, but this is out of control of your program.

这篇关于如何保证在运行时解密的文件被清理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 20:26