Свойство | Тип | Описание | |
---|---|---|---|
$hash | string | Hash Algorithm | |
$hashParam | integer | Hash Parameter | |
$initial | array | Used only for sha512/* | |
$ipad | string | Used only for sha512/* | |
$key | string | Key | |
$length | integer | Byte-length of hash output (Internal HMAC) | |
$opad | string | Used only for sha512/* |
Метод | Описание | |
---|---|---|
__construct ( string $hash = 'sha256' ) | Default Constructor. | |
_sha512 ( string $m, $hash ) | Pure-PHP implementation of SHA512 | |
getBlockLength ( ) : integer | Returns the block length (in bits) | |
getBlockLengthInBytes ( ) : integer | Returns the block length (in bytes) | |
getHash ( ) : string | Gets the hash function. | |
getLength ( ) : integer | Returns the hash length (in bits) | |
getLengthInBytes ( ) : integer | Returns the hash length (in bytes) | |
hash ( string $text ) : string | Compute the HMAC. | |
setHash ( string $hash ) | Sets the hash function. | |
setKey ( string $key = false ) | Sets the key for HMACs |
public __construct ( string $hash = 'sha256' ) | ||
$hash | string |
public getBlockLength ( ) : integer | ||
Результат | integer |
public getBlockLengthInBytes ( ) : integer | ||
Результат | integer |
public getLengthInBytes ( ) : integer | ||
Результат | integer |
public int $length | ||
Результат | integer |