Handling Password Authentication over a Network

試著忘記壹切 提交于 2019-12-08 12:25:35

问题


I'm writing a game which requires users to log in to their accounts in order to be able to play. What's the best way of transmitting passwords from client to server and storing them?

I'm using Python and Twisted, if that's of any relevance.


回答1:


The best way is to authenticate via SSL/TLS. The best way of storing passwords is to store them hashed with some complex hash like sha1(sha1(password)+salt) with salt.




回答2:


If you want plug'n'play solution, use py-bcrypt for storing passwords (http://www.mindrot.org/projects/py-bcrypt/) and SSL/TLS to protect them in transit.



来源:https://stackoverflow.com/questions/3595835/handling-password-authentication-over-a-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!