如何对asp.net中输入数据库的密码进行加密和解密? [英] How to encrypt and Decrypt the password entering into database in asp.net?

查看:87
本文介绍了如何对asp.net中输入数据库的密码进行加密和解密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.

我正在使用C#在Asp.Net中创建注册表单,输入用户的详细信息的密码未加密..

请告诉我如何对用户密码进行加密和解密.并告诉我用于将密码加密到数据库中的代码.请


问候..
Ravinder.Gudelli

Hi.

I am creating registration form in Asp.Net using C#, entering the Details of user''s the password was not encrypted..

please tel me how to encrypt and decrypt the users password.. and also tel me the code for encrypt the password into database. please


Regards..
Ravinder.Gudelli

推荐答案

我建​​议您使用内置的ASP.Net成员资格服务,而不是重新发明任何东西.
http://msdn.microsoft.com/en-us/library/879kf95c (v = vs.100).aspx [
I would suggest you go with built-in ASP.Net Membership service instead re-inventing anything.

http://msdn.microsoft.com/en-us/library/879kf95c(v=vs.100).aspx[^]


尝试了使用C#加密和解密数据 [如何使用ASP加密和解密密码并存储在数据库中.net或使用c# [ CP搜索上的更多结果 [ ^ ]
Tried google[^]?
This search gives 888,000 results.

And the first link of above search, a CP Article:
Encrypt and Decrypt Data with C#[^]
Here is another good article:
how to encrypt and decrypt password and stored in database using asp.net or encrypt or decrypt user password with c#[^]

..and more results on CP Search[^]



您可以使用MD5类

http://msdn2.microsoft.com/en-us/library/system. security.cryptography.md5.aspx [ ^ ]

You can use MD5 class

http://msdn2.microsoft.com/en-us/library/system.security.cryptography.md5.aspx[^]


这篇关于如何对asp.net中输入数据库的密码进行加密和解密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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