ARTLUNG LAB Share

January 3, 2009

20 Random Alphanumeric Passwords

The passwords:

No record is made of these passwords.


Deprecated: Implicit conversion from float 4174109.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4174880.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4175710.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
DHyHBMPzoxDhLuSsTSYS
Deprecated: Implicit conversion from float 4176599.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4177100.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4177679.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
sqZyXv3pbcGkY3zVyY3A
Deprecated: Implicit conversion from float 4178529.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4178760.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4179340.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
K2R7QA6EaUMPZzfyVLfZ
Deprecated: Implicit conversion from float 4179919.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4181289.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
h7vznxQ3FDNvmjjZxJys
Deprecated: Implicit conversion from float 4182930.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4183529.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4184050.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
KrD2PEnR2RAse6WCykt9
Deprecated: Implicit conversion from float 4184649.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4185150.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4185459.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4185710.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4186019.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4186250.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
88LVeTZ4S3THH3TbFNLC
Deprecated: Implicit conversion from float 4187100.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4187409.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4187640.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4188220.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
pBShUcGHhsZhFKbHtVVx
Deprecated: Implicit conversion from float 4189069.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4189899.9999999995 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4190710.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
bXZgjVWu4XQkTq9Vvw6E
Deprecated: Implicit conversion from float 4192100.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
zXYkqB9PrMFEpRmv8ACu
Deprecated: Implicit conversion from float 4193470.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43

Deprecated: Implicit conversion from float 4194010.0000000005 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
AjAVV68HFT8NH8YGgXWm 3UAJMw7XJW7KgtKw3yVz 2zCCo9cd6FUQrz8cxEAE rDTATFXangGvLu87KGJd zM6oAZQWEbdh6hB4LPEc oLYRsvy6kamjaHrsozK7 b3hkkVudyftDG2fpLFtQ qpzASE6rh3u2QG2YRTgR xw77ZDTdJ2CHxwYELTXa EFYWBaEoxxJ4xKRBbkdt A8kRybfYrqYoG6QrEBn9

The code for the class


<?php

/**
 * Class PasswordGenerator
 *
 * @category PHP
 * @package  Classes
 * @author   Joe Crawford <joe@artlung.com>
 * @license  GPL 2.0+ - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * @version  Release: 1.0
 * @link     https://artlung.com/
 * @since    2024-12-03
 */
class PasswordGenerator
{

    public static 
$letters "2346789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnopqrstuvwxyz";
    public static 
$length "20";
    public 
$letters_array;

    
/**
     * PasswordGenerator constructor.
     */
    
function __construct()
    {
        
$this->letters_array = array();

        for (
$a 0$a strlen(self::$letters); $a++) {
            
$this->letters_array[] = self::$letters[$a];
        }
    }


    
/**
     * Make password
     *
     * @return string
     */
    
function make(): string
    
{
        
$password '';
        for (
$i 0$i self::$length$i++) {
            
srand((float)microtime() * 10000000);
            
$password .= $this->letters_array[array_rand($this->letters_array)];
        }
        return 
$password;

    }

    
/**
     * Print one password
     *
     * @return void
     */
    
function printOne()
    {
        print 
$this->make();
    }

    
/**
     * Print many passwords
     *
     * @param $num
     *
     * @return void
     */
    
function printMany($num)
    {
        for (
$i 0$i $num$i++) {
            
$this->printOne();
            print 
"\n";
        }
    }


}

How to invoke the class

$PG = new PasswordGenerator();
$PG->printMany(20);