定制 luzrain/pwgen 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

luzrain/pwgen

Composer 安装命令:

composer require luzrain/pwgen

包简介

PWGen is a library which aims to clone the GNU pwgen functionality.

README 文档

README

PHP ^8.0 Tests Status

PWGen is a library which aims to clone the GNU pwgen functionality. The PWGen library generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as completely random passwords. In particular, passwords generated by pwgen without the secure option should not be used in places where the password could be attacked via a brute-force attack. On the other hand, completely randomly generated passwords have a tendency to be written down, and are subject to being compromised in that fashion.

Installation

$ composer require luzrain/pwgen

Usage

<?php

use PWGen\PWGen;

/**
 * Available options in the PWGen constructor. All of them are optional.
 *
 * length:      Length of the generated password. Default: 8
 * capitalize:  Include at least one capital letter in the password.
 * numerals:    Include at least one number in the password.
 * symbols:     Include at least one special symbol in the password.
 * secure:      Generate completely random passwords.
 * ambiguous:   Don't include ambiguous characters in the password.
 * noVowels:    Do not use any vowels to avoid accidental nasty words.
 * removeChars: Remove characters from the set of characters to generate passwords.
 */
$pwgen = new PWGen(length: 12, symbols: true);
$password = (string) $pwgen;

/**
 * Regenerate password with given options
 */
$pwgen->generate();
$password = (string) $pwgen;

License

PWGen may be distributed under the terms of the GPL License.
Copyright © 2001, 2002 by Theodore Ts'o (C version)
Copyright © 2009 by Superwayne (PHP port)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2022-11-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固