如何从C Sharp应用程序检查密码哈希在Php5.5登录表单中生成哪一个 [英] How Can I Check A Password Hash From C Sharp App Which One Is Generated In Php5.5 Login Form

查看:94
本文介绍了如何从C Sharp应用程序检查密码哈希在Php5.5登录表单中生成哪一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 http://www.php-login.net [ ^ ] - 高级。它生成一个保存在mysql表中的密码哈希,我需要使用此表登录到C sharp应用程序。我的问题是:如何从C sharp应用程序检查密码是否正确?

(我可以编写mysql部分,但我无法生成哈希。)

I use a php 5.5 login form from http://www.php-login.net[^] - Advanced. It is generate a password hash which saved in a mysql table and i need to use this table for login to a C sharp application. My question is: How can i check if password is correct from the C sharp app?
(I can write the mysql part of this, but i can't generate a hash.)

推荐答案

你不应该在服务器端生成哈希,即使它根本不是问题。服务器端永远不应该收到密码。并且不应该通过网络发送原始形式的密码。您的服务器端应仅存储散列密码并将散列与散列进行比较。



如果需要在C#中生成散列,请参阅https://msdn.microsoft.com/en-us/library/system.security .cryptography.hashalgorithm%28v = vs.110%29.aspx [ ^ ]。



所有这些算法的用法是很琐碎。



-SA
You should not generate hash on server side, even though it would not be a problem at all. The server side should never receive a password. And the password, in its original form, should never be sent over the network. Your server side should store hashed passwords only and compare hash to hash.

If you need to generate hash in C#, please see https://msdn.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm%28v=vs.110%29.aspx[^].

The usage of all these algorithms is quite trivial.

—SA


这篇关于如何从C Sharp应用程序检查密码哈希在Php5.5登录表单中生成哪一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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