PHP Класс Pop\Crypt\Sha

Автор: Nick Sagona, III ([email protected])
Наследование: implements Pop\Crypt\CryptInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$bits integer Bits
$rounds integer Rounds
$salt string Salt

Открытые методы

Метод Описание
__construct ( integer $bits = 512, integer $rounds = 5000 ) : self Constructor
create ( string $string ) : string Method to create the hashed value
getBits ( ) : integer Method to get the bits
getRounds ( ) : integer Method to get the rounds
getSalt ( ) : string Method to get the salt
setBits ( integer $bits = 512 ) : self Method to set the cost
setRounds ( integer $rounds = 5000 ) : self Method to set the rounds
setSalt ( string $salt = null ) : self Method to set the salt
verify ( string $string, string $hash ) : boolean Method to verify the hashed value

Описание методов

__construct() публичный Метод

Instantiate the sha object.
public __construct ( integer $bits = 512, integer $rounds = 5000 ) : self
$bits integer
$rounds integer
Результат self

create() публичный Метод

Method to create the hashed value
public create ( string $string ) : string
$string string
Результат string

getBits() публичный Метод

Method to get the bits
public getBits ( ) : integer
Результат integer

getRounds() публичный Метод

Method to get the rounds
public getRounds ( ) : integer
Результат integer

getSalt() публичный Метод

Method to get the salt
public getSalt ( ) : string
Результат string

setBits() публичный Метод

Method to set the cost
public setBits ( integer $bits = 512 ) : self
$bits integer
Результат self

setRounds() публичный Метод

Method to set the rounds
public setRounds ( integer $rounds = 5000 ) : self
$rounds integer
Результат self

setSalt() публичный Метод

Method to set the salt
public setSalt ( string $salt = null ) : self
$salt string
Результат self

verify() публичный Метод

Method to verify the hashed value
public verify ( string $string, string $hash ) : boolean
$string string
$hash string
Результат boolean

Описание свойств

$bits защищенное свойство

Bits
protected int $bits
Результат integer

$rounds защищенное свойство

Rounds
protected int $rounds
Результат integer

$salt защищенное свойство

Salt
protected string $salt
Результат string