定制 boutmad/randompassword 二次开发

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

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

boutmad/randompassword

Composer 安装命令:

composer require boutmad/randompassword

包简介

A package for generating random passwords

README 文档

README

A simple PHP package for generating random passwords with customizable options. Whether you need a secure password for your application or just want to test your systems, this package has got you covered! 🔐

✨ Features

  • Generate a single random password with a specified length.
  • Generate multiple random passwords at once for bulk usage.
  • Options to include special characters for added security.
  • Customizable length and character set to fit your needs.

🛠️ Usage

Here’s a simple example of how to use the RandomPasswordGenerator package in your PHP application:

require_once 'vendor/autoload.php';

use RandomPasswordGenerator\RandomPasswordGenerator;

// Create an instance of the password generator
$passwordGenerator = new RandomPasswordGenerator(12, true); // 12 characters with special chars

// Generate a single password
echo "Generated Password: " . $passwordGenerator->generatePassword() . "\n";

// Generate multiple passwords
$passwords = $passwordGenerator->generateMultiplePasswords(5);
echo "Generated Passwords: \n";
print_r($passwords);

📝 Configuration Options

You can customize the password generation by providing different parameters:

  • Length: Specify the length of the password (e.g., 8, 12, 16).
  • Special Characters: Set to true or false to include or exclude special characters.

🛠️ Installation

To install the boutmad/randompassword package using Composer, follow these steps:

  • Run the following Composer command to install the package in your project:
composer require boutmad/randompassword

Note: If you encounter issues with stability, make sure your composer.json allows for dev versions by adding this to your composer.json:

{
    "minimum-stability": "dev",
    "prefer-stable": true
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-11