Text_Password
[ class tree: Text_Password ] [ index: Text_Password ] [ all elements ]

Class: Text_Password

Source Location: /Text_Password-1.2.1/Text/Password.php

Class Overview


Main class for the Text_Password package


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2004-2016 Martin Jansen, Olivier Vanhoucke, Michael Gauthier

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
Main class for the Text_Password package


[ Top ]


Method Detail

create   [line 71]

string create( [integer $length = 10], [string $type = 'pronounceable'], [string $chars = ''])

Create a single password.
  • Return: Returns the generated password.
  • Access: public

Parameters:

integer   $length   —  Length of the password.
string   $type   —  Type of password (pronounceable, unpronounceable)
string   $chars   —  Character which could be use in the unpronounceable password ex : 'ABCDEFG' or numeric, alphabetical or alphanumeric.

[ Top ]

createFromLogin   [line 131]

string createFromLogin( string $login, string $type, [integer $key = 0])

Create password from login

Method to create password from login

  • Access: public

Parameters:

string   $login   —  Login
string   $type   —  Type
integer   $key   —  Key

[ Top ]

createMultiple   [line 100]

array createMultiple( integer $number, [integer $length = 10], [string $type = 'pronounceable'], [string $chars = ''])

Create multiple, different passwords

Method to create a list of different passwords which are all different.

  • Return: Array containing the passwords
  • Access: public

Parameters:

integer   $number   —  Number of different password
integer   $length   —  Length of the password
string   $type   —  Type of password (pronounceable, unpronounceable)
string   $chars   —  Character which could be use in the unpronounceable password ex : 'A,B,C,D,E,F,G' or numeric, alphabetical or alphanumeric.

[ Top ]

createMultipleFromLogin   [line 176]

array createMultipleFromLogin( array $login, string $type, [integer $key = 0])

Create multiple, different passwords from an array of login

Method to create a list of different password from login

  • Return: Array containing the passwords
  • Access: public

Parameters:

array   $login   —  Login
string   $type   —  Type
integer   $key   —  Key

[ Top ]

_asciiRotx   [line 326]

string _asciiRotx( string $login, integer $key)

Helper method to create password

Method to create a password from a login

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_asciiRotxmm   [line 392]

string _asciiRotxmm( string $login, integer $key)

Helper method to create password

Method to create a password from a login

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_asciiRotxpp   [line 359]

string _asciiRotxpp( string $login, integer $key)

Helper method to create password

Method to create a password from a login

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_createPronounceable   [line 446]

string _createPronounceable( integer $length)

Create pronounceable password

This method creates a string that consists of vowels and consonats.

  • Return: Returns the password
  • Access: protected

Parameters:

integer   $length   —  Length of the password

[ Top ]

_createUnpronounceable   [line 489]

string _createUnpronounceable( integer $length, string $chars)

Create unpronounceable password

This method creates a random unpronounceable password

  • Return: Returns the password
  • Access: protected

Parameters:

integer   $length   —  Length of the password
string   $chars   —  Character which could be use in the unpronounceable password ex : 'ABCDEFG' or numeric, alphabetical or alphanumeric.

[ Top ]

_rand   [line 596]

integer _rand( integer $min, integer $max)

Gets a random integer between min and max

On PHP 7, this uses random_int(). On older systems it uses mt_rand().

  • Access: protected

Parameters:

integer   $min   — 
integer   $max   — 

[ Top ]

_rotx   [line 231]

string _rotx( string $login, integer $key)

Helper method to create password

Method to create a password from a login lowercase only

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_rotxmm   [line 295]

string _rotxmm( string $login, integer $key)

Helper method to create password

Method to create a password from a login lowercase only

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_rotxpp   [line 263]

string _rotxpp( string $login, integer $key)

Helper method to create password

Method to create a password from a login lowercase only

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]

_shuffle   [line 424]

string _shuffle( string $login)

Helper method to create password

Method to create a password from a login

  • Access: protected

Parameters:

string   $login   —  Login

[ Top ]

_xor   [line 204]

string _xor( string $login, integer $key)

Helper method to create password

Method to create a password from a login

  • Access: protected

Parameters:

string   $login   —  Login
integer   $key   —  Key

[ Top ]


Documentation generated on Fri, 26 Feb 2016 20:00:02 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.