XML文件(用户名和密码)和HTML5登录表单 [英] XML file (username and password) and HTML5 login form

查看:421
本文介绍了XML文件(用户名和密码)和HTML5登录表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用XML文件存储HTML5登录表单的用户名和密码时遇到问题。我创建了登录页面,但我无法使用xmlDOM和Javascript有效地将这些内容与xml文件中的用户名和密码与用户提供的用户名和密码进行比较,以确认登录过程。 (XML文件在我的本地硬盘中)

Hi, i have a problem with using XML file to store the username and password for an HTML5 login form. I created the login page but i cannot use the xmlDOM and those things effectively with Javascript to compare the username and password in the xml file with the username and password given by the user to confirm the logging in process. (The XML file is in my local hard disk)

推荐答案

我不知道你的场景和你的问题的细节,但你真的想存储一个密码,无论在哪里,这是一个完全错误的方法。真实身份验证系统不会以原始形式在任何地方存储密码。身份验证绝对不需要;密码只属于创建它的人,没有其他人。感到惊讶,感到不同意?继续阅读。



我使用 加密哈希函数 来存储它并将其与加密进行比较的常用方法密码的哈希函数。您可以比较它,但它是加密不可行从哈希值恢复原始密码。有关详细信息,请参阅我过去的答案:

我已经加密了密码但是当我加密时登录它会给我一个错误。如何解密 [ ^ ] ,

解密加密密码 [ ^ ],

存储密码值int sql server with secure方式 [ ^ ]。



-SA
I don't know the detail of your scenario and your problem, but is you really want to store a password, no matter where, this is a totally wrong approach. Real authentication systems do not store password, in its original form, anywhere. It is absolutely not needed for authentication; and the password belongs only to the person who created it, no one else. Surprised, feel disagree? Keep reading.

The usual approach i using cryptographic hash function to store it and to compare it with cryptographic hash function of a password. You can compare it, but it's cryptographic infeasible to restore the original password from hash value. For further detail, please see my past answers:
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
Decryption of Encrypted Password[^],
storing password value int sql server with secure way[^].

—SA


这篇关于XML文件(用户名和密码)和HTML5登录表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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