ARTLUNG LAB Share

January 3, 2009

20 Random Alphanumeric Passwords

The passwords:

No record is made of these passwords.


SE6nFn9m2jjS7mDXaXgj
2tZzbS94uWbtgUkZEeFd
2rWCTX9mEGV3rE2337BD
4juwsHWWtePodhjR4qnH
eL88kFrnzU6eVa4U7pUY
jPvUBfCmWQNcpMDLEwLx
3myFe9zPfGhFKtR4Lukh
KCuaBeEzEEV467KQvJeo
3FSHJjh8L2no4ggteU6L
WAraZWxzDtHLft8sEy82
yyNXKNampkAHb47yvHJw

Deprecated: Implicit conversion from float 1343119.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
yBEVwkCzxBmUcwu4DFcN
Deprecated: Implicit conversion from float 1344509.9999999998 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 1345600.0000000002 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
nxsk4qWXfmawXhFhGNTP
Deprecated: Implicit conversion from float 1346459.9999999998 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 1347289.9999999998 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 1355889.9999999998 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 1356140.0000000002 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
dHAD2XHd378PqngVGUJA
Deprecated: Implicit conversion from float 1357269.9999999998 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 1358659.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
4CDSC88Kyo3hvmkbwRnu
Deprecated: Implicit conversion from float 1409739.9999999998 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 1410839.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
rU8M23BFMZMYAjVTsVTg
Deprecated: Implicit conversion from float 1412219.9999999998 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 1413049.9999999998 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 1413889.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
t8cxKMwJx6QbQaQRyX4S
Deprecated: Implicit conversion from float 1414990.0000000002 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 1415820.0000000002 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 1416930.0000000002 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
YxctXZxTLu6oTbV9aysv
Deprecated: Implicit conversion from float 1418030.0000000002 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 1418619.9999999998 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 1419449.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
BYMRceScgF38qzj8eFb9
Deprecated: Implicit conversion from float 1420820.0000000002 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 1421650.0000000002 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 1422499.9999999998 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
sF4q7Jz9KbJqxPGFHvtU

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);