简体   繁体   English

如何在C#中向用户隐藏文件

[英]How to hide your files from user in C#

I designed an application which reads alphabets from text files placed in debug folder and displays them on dot matrix screen. 我设计了一个应用程序,该应用程序从放置在调试文件夹中的文本文件中读取字母,并将其显示在点矩阵屏幕上。 I want to keep the Text files confidential, Is there any way to distribute my application while keeping the files and folder inside "bin" hidden. 我想保持文本文件的机密性,有什么办法可以分发我的应用程序,同时将“ bin”中的文件和文件夹保持隐藏状态。 One way that i can think of is to encrypt the data , but it's not an efficient solution for me as there are around hundred files. 我可以想到的一种方法是加密数据,但这对我来说不是一个有效的解决方案,因为大约有数百个文件。 Any kind of suggestion will be helpful Thanks !! 任何建议都会有所帮助,谢谢!

The approach would vary depending on the type of application (web, desktop, mobile, etc.). 该方法将取决于应用程序的类型(Web,桌面,移动等)而有所不同。 Assuming this is a desktop application ... 假设这是一个桌面应用程序 ...

You could embed the resources then attempt to use an obfuscator (example Redgate's SmartAssembly ) to increase the level of difficulty of decompiling your application o access the file(s). 您可以嵌入资源,然后尝试使用混淆器(例如Redgate的SmartAssembly )来提高反编译应用程序或访问文件的难度。 Some obfuscator tools (example Crypto Obfuscator For .NET ) allow for encryption signed with certificates to increase the level of security. 一些混淆器工具(例如.NET的Crypto Obfuscator )允许使用证书签名的加密,以提高安全级别。

Note that embedding and obfuscating is not guaranteed but depending on your average user, and the importance of the files, it may be just enough. 请注意,不能保证嵌入和混淆,但是取决于您的普通用户和文件的重要性,这可能就足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM