如何使用密码打开加密文件而不解密 [英] How to open a encrypted file with password without decrypting

查看:116
本文介绍了如何使用密码打开加密文件而不解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb.net中创建了数字图书馆并加密了所有文件,如何在不解密的情况下用密码打开加密文件。 (如果我在打开时解密,任何机构都可以通过打开文件夹访问该文件)

提前感谢。

解决方案

没有办法在不解密的情况下读取文件的未加密的上下文。但是如果你不想,你不需要随时都有一个未加密的文件版本。



你可以在dotnet中有一个标准的类使用, CryptoStream [ ^ ],您可以使用几种加密方法。也请看: http://www.paulrohde.com/tag/cryptostream/ [ ^ ]



仍然,这应该在两个方向上使用,但是在您的帖子中,如果该数据已经以某种方式加密或者您要在项目中添加加密,则不清楚。还有一件值得关注的事情就是你要存储密钥的位置。



还有一种方法很难,但实际上是保护文件不受其他影响Windows用户,而不是创建者姓名的用户。请参阅 .net的DPAPI包装器 [ ^ ]。

i hace created digital library in vb.net and encrypting all files, how do i open encrypted file with password without decrypting. ( if i decrypt while opening, any body can access that file by opening folder)
thanks in advance.

解决方案

There is no way to read the unencrypted contetn of a file without decrypting it. But you don't need to have an unencrypted version of the file at any time if you don't want to.

There is a standard class in dotnet you could use, CryptoStream[^], and you have several cryptography methods to use with. See this too: http://www.paulrohde.com/tag/cryptostream/[^]

Still, this should be used in both directions, but it is not clear in your post, if that data is already encrypted somehow or you are about to add encryption in your project. And an other thing to care about is where you want to store the key.

There is an other method tough, but that one is actually protecting the file just from other windows users than the one in who's name it was created. See DPAPI wrapper for .net[^].


这篇关于如何使用密码打开加密文件而不解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆