简单的代码来加密和解密Asp.net中的数据连接 [英] Simple code to Encryption And Decryption of a data connection in Asp.net

查看:71
本文介绍了简单的代码来加密和解密Asp.net中的数据连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Asp.Net中编写数据连接的简单加密和解密?

How can I write a simple Encryption And Decryption of a data connection in Asp.Net?

推荐答案

您不需要手动滚动自己的这个的东西:

加密和解密配置部分 [ ^ 。从代码的角度来看,这是透明的:你加密web.config中的信息,当你访问它时框架会为你解密。



你可能需要如果使用网络农场,则考虑制作可导出的密钥。
You don''t need to hand-roll your own stuff for this:
Encrypting and Decrypting Configuration Sections[^]. This is transparent from the code point of view: you encrypt the information in the web.config and the framework decrypts it for you when you access it.

You might need to consider making an exportable key if using a web-farm.


这篇关于简单的代码来加密和解密Asp.net中的数据连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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