PHP Class Pop\Crypt\Mcrypt

Author: Nick Sagona, III ([email protected])
Inheritance: extends Pop\Crypt\AbstractCrypt
Exibir arquivo Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Property Type Description
$cipher integer Cipher
$iv string IV
$ivSize integer IV size
$mode integer Mode
$salt string Salt
$source integer Source

Public Methods

Method Description
__construct ( integer $cipher = null, integer $mode = null, integer $source = null ) : self Constructor
create ( string $string ) : string Method to create the hashed value
decrypt ( string $hash ) : string Method to decrypt the hashed value
getCipher ( ) : integer Method to get the cipher
getIv ( ) : string Method to get the iv
getIvSize ( ) : integer Method to get the iv size
getMode ( ) : integer Method to get the mode
getSalt ( ) : string Method to get the salt
getSource ( ) : integer Method to get the source
setCipher ( integer $cipher = null ) : self Method to set the cipher
setMode ( integer $mode = null ) : self Method to set the mode
setSalt ( string $salt = null ) : self Method to set the salt
setSource ( integer $source = null ) : self Method to set the source
verify ( string $string, string $hash ) : boolean Method to verify the hashed value

Method Details

__construct() public method

Instantiate the mcrypt object.
public __construct ( integer $cipher = null, integer $mode = null, integer $source = null ) : self
$cipher integer
$mode integer
$source integer
return self

create() public method

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

decrypt() public method

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

getCipher() public method

Method to get the cipher
public getCipher ( ) : integer
return integer

getIv() public method

Method to get the iv
public getIv ( ) : string
return string

getIvSize() public method

Method to get the iv size
public getIvSize ( ) : integer
return integer

getMode() public method

Method to get the mode
public getMode ( ) : integer
return integer

getSalt() public method

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

getSource() public method

Method to get the source
public getSource ( ) : integer
return integer

setCipher() public method

Method to set the cipher
public setCipher ( integer $cipher = null ) : self
$cipher integer
return self

setMode() public method

Method to set the mode
public setMode ( integer $mode = null ) : self
$mode integer
return self

setSalt() public method

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

setSource() public method

Method to set the source
public setSource ( integer $source = null ) : self
$source integer
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

$cipher protected_oe property

Cipher
protected int $cipher
return integer

$iv protected_oe property

IV
protected string $iv
return string

$ivSize protected_oe property

IV size
protected int $ivSize
return integer

$mode protected_oe property

Mode
protected int $mode
return integer

$salt protected_oe property

Salt
protected string $salt
return string

$source protected_oe property

Source
protected int $source
return integer