Apache password authentication

see
package Default

 Methods

Constructor

__construct(array|\Traversable $options = array()

Parameters

$options

array\Traversable

Exceptions

\Zend\Crypt\Password\Exception\InvalidArgumentException

Generate the hash of a password

create(string $password) : string
inherited_from \Zend\Crypt\Password\PasswordInterface::create()

Parameters

$password

string

Exceptions

\Zend\Crypt\Password\Exception\RuntimeException

Returns

string

Get the AuthName (for digest authentication)

getAuthName() : string

Returns

string

Get the format of the password

getFormat() : string

Returns

string

Get the username

getUserName() : string

Returns

string

Set the AuthName (for digest authentication)

setAuthName(string $name) : \Zend\Crypt\Password\Apache

Parameters

$name

string

Returns

\Zend\Crypt\Password\Apache

Set the format of the password

setFormat(string $format) : \Zend\Crypt\Password\Apache

Parameters

$format

string

Exceptions

\Zend\Crypt\Password\Exception\InvalidArgumentException

Returns

\Zend\Crypt\Password\Apache

Set the username

setUserName(string $name) : \Zend\Crypt\Password\Apache

Parameters

$name

string

Returns

\Zend\Crypt\Password\Apache

Verify if a password is correct against a hash value

verify(string $password, string $hash) : boolean
inherited_from \Zend\Crypt\Password\PasswordInterface::verify()

Parameters

$password

string

$hash

string

Returns

boolean

APR1 MD5 algorithm

apr1Md5(string $password, null|string $salt = null) : string

Parameters

$password

string

$salt

nullstring

Returns

string

Convert a binary string using the alphabet "./0-9A-Za-z"

toAlphabet64(string $value) : string

Parameters

$value

string

Returns

string

 Properties

 

AuthName (realm) for digest authentication

$authName : string

Default

 

$format

$format : string

Default

 

$supportedFormat

$supportedFormat : array

Default

array('crypt', 'sha1', 'md5', 'digest')
 

UserName

$userName : string

Default

 Constants

 

ALPHA64

ALPHA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 
 

BASE64

BASE64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'