PHP Class Pop\Crypt\Mcrypt

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

Protected Properties

Свойство Type Description
$cipher integer Cipher
$iv string IV
$ivSize integer IV size
$mode integer Mode
$salt string Salt
$source integer Source

Méthodes publiques

Méthode 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 méthode

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

create() public méthode

Method to create the hashed value
public create ( string $string ) : string
$string string
Résultat string

decrypt() public méthode

Method to decrypt the hashed value
public decrypt ( string $hash ) : string
$hash string
Résultat string

getCipher() public méthode

Method to get the cipher
public getCipher ( ) : integer
Résultat integer

getIv() public méthode

Method to get the iv
public getIv ( ) : string
Résultat string

getIvSize() public méthode

Method to get the iv size
public getIvSize ( ) : integer
Résultat integer

getMode() public méthode

Method to get the mode
public getMode ( ) : integer
Résultat integer

getSalt() public méthode

Method to get the salt
public getSalt ( ) : string
Résultat string

getSource() public méthode

Method to get the source
public getSource ( ) : integer
Résultat integer

setCipher() public méthode

Method to set the cipher
public setCipher ( integer $cipher = null ) : self
$cipher integer
Résultat self

setMode() public méthode

Method to set the mode
public setMode ( integer $mode = null ) : self
$mode integer
Résultat self

setSalt() public méthode

Method to set the salt
public setSalt ( string $salt = null ) : self
$salt string
Résultat self

setSource() public méthode

Method to set the source
public setSource ( integer $source = null ) : self
$source integer
Résultat self

verify() public méthode

Method to verify the hashed value
public verify ( string $string, string $hash ) : boolean
$string string
$hash string
Résultat boolean

Property Details

$cipher protected_oe property

Cipher
protected int $cipher
Résultat integer

$iv protected_oe property

IV
protected string $iv
Résultat string

$ivSize protected_oe property

IV size
protected int $ivSize
Résultat integer

$mode protected_oe property

Mode
protected int $mode
Résultat integer

$salt protected_oe property

Salt
protected string $salt
Résultat string

$source protected_oe property

Source
protected int $source
Résultat integer