数据库中记录的MVC密码 [英] MVC Password Encripted In database

查看:84
本文介绍了数据库中记录的MVC密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

我一直在使用MVC3.
并且我已将密码字段放入数据库(在Enforpted formate中).

如何获取已解密格式的值.
因为实体框架总是给空白值.

Hi Friends,

I have been using MVC 3.
and I have placed my password field in to the database(that is in Encripted formate).

How to get the value of decripted formated.
Because of entity framework is always giving the blank value.

var validateData=from n in rexDB.mst_user_info
                           where n.login_id==userName && n.login_key==Password
                           select n;


          if (validateData.ToList().Count > 0)
              return true;
          else
              return false;



我已经尝试了Google搜索,但没有得到满意的答案.

请帮助我摆脱困境.

谢谢



I have tried the googling.but not get the satisfactory answer.

Please help me to get out of this.

Thanks

推荐答案

您本可以使用如何在c#中创建密码加密解密 [ ^ ]
http://chandradev819 .wordpress.com/2011/04/11/how-to-to-encrypt-and-decrypt-password-in-asp-net-using-c/ [
You could have used Encryption/Decryption Function in .NET using the TripleDESCryptoServiceProvider Class[^].

Refer these links also:
how to create password encrypt decrypt in c#[^]
http://chandradev819.wordpress.com/2011/04/11/how-to-encrypt-and-decrypt-password-in-asp-net-using-c/[^]



--Amit


这篇关于数据库中记录的MVC密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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