Static Public Member Functions |
static | compute ($key, $hash, $data, $output=self::STRING) |
Data Fields |
const | STRING = 'string' |
const | BINARY = 'binary' |
Static Protected Member Functions |
static | _setHashAlgorithm ($hash) |
static | _hash ($data, $output=self::STRING, $internal=false) |
static | _getMhashDefinition ($hashAlgorithm) |
Static Protected Attributes |
static | $_key = null |
static | $_packFormat = null |
static | $_hashAlgorithm = 'md5' |
static | $_supportedMhashAlgorithms |
Detailed Description
Definition at line 39 of file Hmac.php.
Member Function Documentation
static _getMhashDefinition |
( |
$ |
hashAlgorithm ) |
[static, protected] |
Since MHASH accepts an integer constant representing the hash algorithm we need to make a small detour to get the correct integer matching our algorithm's name.
- Parameters:
-
- Returns:
- integer
Definition at line 172 of file Hmac.php.
static _hash |
( |
$ |
data, |
|
|
$ |
output = self::STRING , |
|
|
$ |
internal = false |
|
) |
| [static, protected] |
Perform HMAC and return the keyed data
- Parameters:
-
string | $data | |
string | $output | |
bool | $internal | Option to not use hash() functions for testing |
- Returns:
- string
Definition at line 146 of file Hmac.php.
static _setHashAlgorithm |
( |
$ |
hash ) |
[static, protected] |
static compute |
( |
$ |
key, |
|
|
$ |
hash, |
|
|
$ |
data, |
|
|
$ |
output = self::STRING |
|
) |
| [static] |
Performs a HMAC computation given relevant details such as Key, Hashing algorithm, the data to compute MAC of, and an output format of String, Binary notation or BTWOC.
- Parameters:
-
string | $key | |
string | $hash | |
string | $data | |
string | $output | |
boolean | $internal | |
- Returns:
- string
Definition at line 91 of file Hmac.php.
Field Documentation
$_supportedMhashAlgorithms [static, protected] |
Initial value: array('adler32',' crc32', 'crc32b', 'gost',
'haval128', 'haval160', 'haval192', 'haval256', 'md4', 'md5', 'ripemd160',
'sha1', 'sha256', 'tiger', 'tiger128', 'tiger160')
Definition at line 69 of file Hmac.php.
Constants representing the output mode of the hash algorithm
Definition at line 76 of file Hmac.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Crypt/Hmac.php