drjv5597
2018-07-12 07:21
浏览 105
已采纳

如何使用PHP创建wordpress密码哈希生成器? [关闭]

I want to create WordPress password hash using PHP like www.passwordtool.hu. An example:

Wordpress Password: admin321

Wordpress Password Hash: $1$8HmCMIeg$qv9z585yftJa2Hxqo7/RB/

Online Password Generator Tool: http://www.passwordtool.hu/wordpress-password-hash-generator-v3-v4

How to create this WordPress password hash generator using PHP?

图片转代码服务由CSDN问答提供 功能建议

我想使用PHP创建WordPress密码哈希,如www.passwordtool.hu。 例如:

Wordpress密码:admin321

Wordpress密码哈希:$ 1 $ 8HmCMIeg $ qv9z585yftJa2Hxqo7 / RB / 在线密码生成器工具: http://www.passwordtool.hu / wordpress-password-hash-generator-v3-v4

如何使用PHP创建此WordPress密码哈希生成器?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dpxkkhu1812 2018-07-12 07:24
    已采纳

    Wordpress provides a default function wp_hash_password();

    Example:

    $password = 'admin';
    $hash_password = wp_hash_password($password);
    echo $hash_password;
    

    To work this in PHP just load wp-load.php, So that you can use default wordpress functions.

    Wordpress actually use Portable PHP password hashing framework. WP has this included in /wp-includes/class-phpass.php

    点赞 打赏 评论