Class Bcrypt

Summary

Fully Qualified Name: Zend\Crypt\Password\Bcrypt
Implements: PasswordInterface

Description

Bcrypt algorithm using crypt() function of PHP

Methods

Name Description Defined By
__construct() Constructor Bcrypt
benchmarkCost() Bcrypt
create() Bcrypt Bcrypt
getCost() Get the cost parameter Bcrypt
getSalt() Get the salt value Bcrypt
setCost() Set the cost parameter Bcrypt
setSalt() Set the salt value Bcrypt
verify() Verify if a password is correct against a hash value Bcrypt

Method Details

__construct()

Constructor

Parameter Name Type Description
$options array|\Traversable

Returns:

benchmarkCost()

Parameter Name Type Description
$timeTarget

Returns: void

create()

Bcrypt

Parameter Name Type Description
$password string

Returns: string

getCost()

Get the cost parameter

Returns: string

getSalt()

Get the salt value

Returns: string

setCost()

Set the cost parameter

Parameter Name Type Description
$cost int|string

Returns: \Bcrypt Provides a fluent interface

setSalt()

Set the salt value

Parameter Name Type Description
$salt string

Returns: \Bcrypt Provides a fluent interface

verify()

Verify if a password is correct against a hash value

Parameter Name Type Description
$password string
$hash string

Returns: bool

Top