什么是加密在C#中的文件最简单的方法? [英] What's the easiest way to encrypt a file in c#?

查看:223
本文介绍了什么是加密在C#中的文件最简单的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此之前:

我看了确实在让对方的话题,但我无法找到他们的答案结果
(本其他都是有关config-文件,或技术列表)

I have read indeed the other topics on SO, but I can't find an answer in them.
(The others are about config-files, or a list of techniques)

因此,我国的问题很简单,虽然有点主观的(我会事先:-)贴上标签)什么是的最简单的方式..

My question thus is very simple, though a bit subjective (I'll label it beforehand :-)) what is the easiest way..

推荐答案

File.Encrypt 是很简单 - 一个调用(只有一个参数)。

File.Encrypt is pretty simple - one call (with one parameter).

当然,这真的取决于你想要加密的东西。 File.Encrypt加密到目前的帐户,它是没有多大用处,如果你周围传递文件。但是,鉴于你的天赋 - 加密文件,即最简单的方法 - 它必须是一个候选人

Of course, it really depends on what you want the encryption for. File.Encrypt encrypts to the current account, which isn't much use if you're passing the file around. But, given your spec - i.e. easiest way to encrypt a file - it has to be a candidate!

这篇关于什么是加密在C#中的文件最简单的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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