WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

hash_hmac() WP 3.2.0

Compat function to mimic hash_hmac().

The Hash extension is bundled with PHP by default since PHP 5.1.2. However, the extension may be explicitly disabled on select servers. As of PHP 7.4.0, the Hash extension is a core PHP extension and can no longer be disabled. I.e. when PHP 7.4.0 becomes the minimum requirement, this polyfill and the associated _hash_hmac() function can be safely removed.

Хуков нет.

Возвращает

Строку/false. The hash in output determined by $raw_output. False if $algo is unknown or invalid.

Использование

hash_hmac( $algo, $data, $key, $raw_output );
$algo(строка) (обязательный)
Hash algorithm. Accepts 'md5' or 'sha1'.
$data(строка) (обязательный)
Data to be hashed.
$key(строка) (обязательный)
Secret key to use for generating the hash.
$raw_output(true/false)
Whether to output raw binary data (true), or lowercase hexits (false).
По умолчанию: false

Заметки

  • Смотрите: _hash_hmac()

Список изменений

С версии 3.2.0 Введена.

Код hash hmac: wp-includes/compat.php WP 5.4.2

<?php
function hash_hmac( $algo, $data, $key, $raw_output = false ) {
	return _hash_hmac( $algo, $data, $key, $raw_output );
}