在客户端如何在asp.net中动态加密密码 [英] In client side how to encrypt password dynamically in asp.net

查看:63
本文介绍了在客户端如何在asp.net中动态加密密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在登录页面用户输入登录ID和密码。,密码加密 32位,密码加密应该动态。



示例:



第一次登录

In login page user enter login id and password., the password should encrypt with 32bit and password encryption should be dynamic.

example:

1st time login

password: abcd  =>   xcvb12ncn(encrypted password)





第二次登录



2nd time login

password abcd   =>   dfghgfgh5(encrypted password)





其中登录密码相同但加密密码不同。

我需要喜欢这个!







给我一个解决方案!



where login password is same but encrypted password is differ.
I need like this !



Give me a solution anyone !

推荐答案

访问:

如何使用Javascript将文本框的加密值从客户端发送到服务器端? [ ^ ]


Plz try这是加密......



Plz try ths for encryption...

System.Web.Security.FormsAuthenticationTicket EncPass = new         FormsAuthenticationTicket(txtPass.Text.Trim(), false, 600);
System.Web.Security.FormsAuthenticationTicket EncUser = new FormsAuthenticationTicket(txtUser.Text.Trim(), false, 600);
            // returns encrypted string.
            string pass = FormsAuthentication.Encrypt(EncPass);
            string User = FormsAuthentication.Encrypt(EncUser);
            //Setting the Cookies value. 

            Response.Cookies["UName"].Value = User;
            Response.Cookies["PWD"].Value = pass;
            Response.Cookies["UName"].Expires = DateTime.Now.AddDays(30);
            Response.Cookies["PWD"].Expires = DateTime.Now.AddDays(30);


登录信息非常敏感,应谨慎处理。请参阅我的答案。



以登录形式注册时以加密形式保存密码 [ ^ ]



请记住,不保证加密。



问候。
Login info is very sensitive which should be carefully handled. See my answer related to this one.

saving password in encrypted form during registering in login form[^]

Remember, no encryption is secured.

Regards.


这篇关于在客户端如何在asp.net中动态加密密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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