wordpress密码哈希如何工作? [英] How does wordpress password hash work?

查看:87
本文介绍了wordpress密码哈希如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将Django系统与Wordpress网站进行整合,因为wordpress用户应该能够登录DJnago部分,反之亦然。

I need to integrate a Django system with a Wordpress site, as in wordpress users should be able to log in the DJnago part and vice versa,

需要了解密码散列在Wordpress中的工作原理。我可以看到存储用户名和密码散列的 wp_users 表。

For this I need to understand how the password hashing works in Wordpress. I can see the wp_users table which stores the username and password hashes.

查看wordpress代码,我可以请参阅通过 wp_set_password 设置密码,这是使用 hash_password 哈希密码。

Looking through the wordpress code, I can see the password is set via wp_set_password, which is using hash_password to hash the password.

现在我不了解足够的PHP来了解它的工作原理。我需要在python中复制相同的内容,以便我可以从Django部分验证密码。

Now I dont know enough PHP to understand how it is working. I need to replicate the same in python so I can validate the password from Django part.

推荐答案

在实现中有一个注释说:

There is a comment in the implementation saying:

  28  /**
  29   * Portable PHP password hashing framework.
  30   *
  31   * @package phpass
  32   * @version 0.1 / genuine
  33   * @link http://www.openwall.com/phpass/
  34   * @since 2.5
  35   */

使用的散列框架是 phpass ,其页面链接到Python实现。 以下是链接(.tar.gz)。该页面有一些其他有用的链接(例如Perl实现)。

The hashing framework used is phpass, and its page links to a Python implementation. Here's the link (.tar.gz). That page has some other useful links (such as a Perl implementation).

这篇关于wordpress密码哈希如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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