Orpheus

PasswordGenerator
in package

The PasswordGenerator class

Class to generate random secured password

Tags
author

Florent Hazard contact@sowapps.com

Table of Contents

Constants

CHAR_ALL  = 15
CHAR_ALPHA  = 3
CHAR_ALPHA_DIGIT  = 7
CHAR_ALPHA_LOWER  = 1
CHAR_ALPHA_UPPER  = 2
CHAR_DIGIT  = 4
CHAR_SYMBOL  = 8

Properties

$primarySets  : array<string|int, mixed>
The set of character we could require in password

Methods

__construct()  : mixed
Constructor
generate()  : string
Generate a random complex password
setPrimarySet()  : static
Set a known set of character by flag

Constants

Properties

$primarySets

The set of character we could require in password

protected array<string|int, mixed> $primarySets = []

Methods

generate()

Generate a random complex password

public generate([int $length = 10 ][, int $restriction = self::CHAR_ALPHA_DIGIT ][, array<string|int, int> $tokens = [self::CHAR_ALPHA, self::CHAR_DIGIT] ]) : string
Parameters
$length : int = 10
$restriction : int = self::CHAR_ALPHA_DIGIT
$tokens : array<string|int, int> = [self::CHAR_ALPHA, self::CHAR_DIGIT]
Return values
string

setPrimarySet()

Set a known set of character by flag

public setPrimarySet(int $flag, string $characters) : static
Parameters
$flag : int
$characters : string
Return values
static

							
On this page

Search results