A simple package that generate strong random characters that can be use for password.
- PHP version from 5.6.* up to latest.
- Use the command below to install the package via composer:
composer require lorddashme/php-strong-password-generator
- Basic usage:
<?php
include __DIR__ . '/vendor/autoload.php';
use LordDashMe\StrongPasswordGenerator\StrongPasswordGenerator;
// Initialize the Strong Password Generator main class.
$strongPasswordGenerator = new StrongPasswordGenerator();
// Set the character length output.
$strongPasswordGenerator->length(25);
// Execute the generation process function.
$strongPasswordGenerator->generate();
// Get the generated output.
$strongPasswordGenerator->get(); // "abcde12345..."
This package is open-sourced software licensed under the MIT license.