PHP Class Pop\Crypt\Crypt

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Crypt\CryptInterface
显示文件 Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$salt string Salt

Public Methods

Method Description
__construct ( string $salt = null ) : self Constructor
create ( string $string ) : string Method to create the hashed value
getSalt ( ) : string Method to get the salt
setSalt ( string $salt = null ) : self Method to set the salt
verify ( string $string, string $hash ) : boolean Method to verify the hashed value

Method Details

__construct() public method

Instantiate the crypt object.
public __construct ( string $salt = null ) : self
$salt string
return self

create() public method

Method to create the hashed value
public create ( string $string ) : string
$string string
return string

getSalt() public method

Method to get the salt
public getSalt ( ) : string
return string

setSalt() public method

Method to set the salt
public setSalt ( string $salt = null ) : self
$salt string
return self

verify() public method

Method to verify the hashed value
public verify ( string $string, string $hash ) : boolean
$string string
$hash string
return boolean

Property Details

$salt protected_oe property

Salt
protected string $salt
return string