承接 losthost/passg 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

losthost/passg

最新稳定版本:v1.1.0

Composer 安装命令:

composer require losthost/passg

包简介

A simple and useful password generator that can generate passwords of different symbol classes

README 文档

README

Simple Usage

use losthost\passg\Pass;

$new_password = Pass::generate();

It will generate a 14-symbol (it is max for Windows) password, that will not contain ambiguous symbols like 1 and l, O ans 0 etc. Also it will (or will not) contain only _ as a special symbol (to simplify highligting the password by double click).

More complex usage

use losthost\passg\Pass;

$new_password = Pass::generate(4, '0123456789');

It will generate a 4-digit password (eg. a pin-code)

Very complex usage

use losthost\passg\Pass;

// Generate a 14-symbol password that contains at least 1 symbol of each class
$new_password_1 = Pass::generate(14, [
    Pass::ALL_LOWERCASE,
    Pass::ALL_UPPERCASE,
    Pass::ALL_DIGITS,
    Pass::ALL_SYMBOLS
]); 
        // ex. P3H{nh"/|S2.?|

// Generate a 10-symbol password that contains at least 3 digits and 3 lowercase letters
$new_password_2 = Pass::generate(10, [
    Pass::CLEAN_DIGITS, 
    Pass::CLEAN_LOWERCASE
], 3); 
        // ex. 6kf5czqi86

// Generate a 4-digits password that contain at least 2 `5`
$new_password_3 = Pass::generate(4, [
    '012346789', '5'
], 2); 
        // ex. 5751

TODO

Now it seems nothing to do

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-30