selfsimilar/drupal7_password_hasher 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

selfsimilar/drupal7_password_hasher

Composer 安装命令:

composer require selfsimilar/drupal7_password_hasher

包简介

Drupal 7 password hasher wrapped in a properly namespaced class wrapper.

README 文档

README

Build Status

This is the Drupal 7 password hasher code, reformatted in to a PSR-4 compliant library class for use in PHP projects that need to import legacy Drupal 7 user accounts. Drupal 7 is licensed under the GPLv3, and as this borrows directly from that code, I have licensed this code similarly. Thanks to HauteLook for the Modernized Openwall Phpass package for inspiration.

Usage

<?php

namespace Your\Namespace;

use Selfsimilar\D7PasswordHasher\Hasher;

require_once(__DIR__ . "/vendor/autoload.php");

// Constructor take the iteration count for number of cycles to hash, but by
// default uses the Drupal 7 stock number. You may need to check your Drupal 7
// installation for the value of `password_count_log2` (e.g. `drush
// variable-get password_count_log2`). If it is set and different than 15,
// you will need to pass it to the Hasher() constructor.
$passwordHasher = new Hasher();

$password = $passwordHasher->HashPassword('secret');
var_dump($password);

$passwordMatch = $passwordHasher->CheckPassword('secret',
  "$2a$08$0RK6Yw6j9kSIXrrEOc3dwuDPQuT78HgR0S3/ghOFDEpOGpOkARoSu");
var_dump($passwordMatch);

统计信息

  • 总下载量: 9.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2020-11-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固