使用MVC3加密密码 [英] Encrypt password using mvc3

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

问题描述



我在mvc3程序中遇到一个问题..

密码只有一个文本框
在右侧的一个复选框中,该复选框的字段名称已加密.
如果我在文本框中输入密码,然后单击复选框.
当我单击复选框时,文本框将自动更改为加密模式. 当我的复选框模式为false时,文本框将自动更改为解密模式.

请帮助我解决这个问题..

Hi,

I have one problem in mvc3 program..

password is having one textbox
in that right side one checkbox is there that checkbox field name is encrypt.
if i eneter the password in textbox and click the checkbox.
when i click the checkbox the textbox is automatically change to the encrypt mode..
when my checkbox mode is false the textbox automatically change to the decrypt mode.

please help me to solve this..

推荐答案

您已经告诉我们您要编写的内容,但没有告诉我们您尝试过的内容. 加密"是什么意思?为什么会有这种选择?加密在哪里?如果要访问加密功能,.NET中有一个完整的密码学名称空间.
you''ve told us what you want to write, but not what you''ve tried. What do you mean by ''encrypt'' ? Why would that be an option ? Encrypt where ? There''s a whole Cryptography namespace in .NET if you want access to crypto functions.


您可以使用System.Security.Cryptography来加密密码.
请参考以下链接:
如何:使用C#加密和解密字符串 [ ^ ]
如何进行加密和解密使用C#在asp.net中输入密码? [使用C#简单加密和解密数据 [ ^ ]
使用C#加密和解密数据 [在C#中使用DES加密/解密字符串 [ ^ ]



--Amit
You can use System.Security.Cryptography to encrypt your password.
Refer the links below:
How To: Encrypt and Decrypt string Using C#[^]
How to encrypt and decrypt password in asp.net using C#?[^]
Simple encrypting and decrypting data in C#[^]
Encrypt and Decrypt Data with C#[^]
Encrypt/Decrypt String using DES in C#[^]



--Amit


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

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