Class Horde_Auth
The Horde_Auth class provides some useful authentication-related utilities and constants for the Auth package.
Copyright 1999-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you did not receive this file, http://www.horde.org/licenses/lgpl21
Category: Horde
License: LGPL-2.1
Author: Chuck Hagenbuch chuck@horde.org
Author: Michael Slusarz slusarz@horde.org
Located at Horde/Auth.php
public static
|
|
public static
string
|
#
getCryptedPassword( string $plaintext, string $salt = '', string $encryption = 'md5-hex', boolean $show_encrypt = false )
Formats a password using the current encryption. |
public static
string
|
#
getSalt( string $encryption = 'md5-hex', string $seed = '', string $plaintext = '' )
Returns a salt for the appropriate kind of password encryption. Optionally takes a seed and a plaintext password, to extract the seed of an existing password, or for encryption types that use the plaintext in the generation of the salt. |
public static
string
|
#
genRandomPassword( )
Generates a random, hopefully pronounceable, password. This can be used when resetting automatically a user's password. |
public static
|
#
checkPasswordPolicy( string $password, array $policy )
Checks whether a password matches some expected policy. |
public static
|
#
checkPasswordSimilarity( string $password, array $dict, float $max = 80 )
Checks whether a password is too similar to a dictionary of strings. |
integer |
REASON_BADLOGIN
Authentication failure reasons. |
#
1
|
integer |
REASON_FAILED
|
#
2
|
integer |
REASON_EXPIRED
|
#
3
|
integer |
REASON_LOGOUT
|
#
4
|
integer |
REASON_MESSAGE
|
#
5
|
integer |
REASON_SESSION
|
#
6
|
integer |
REASON_LOCKED
|
#
7
|
string |
APRMD5_VALID
64 characters that are valid for APRMD5 passwords. |
#
'./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
|
string |
VOWELS
Characters used when generating a password. |
#
'aeiouy'
|
string |
CONSONANTS
|
#
'bcdfghjklmnpqrstvwxz'
|
string |
NUMBERS
|
#
'0123456789'
|