← All docs

hash_hmac()

Generates a keyed hash value using the HMAC method.

hash_hmac()

function hash_hmac(string $algo, string $data, string $key, bool $binary = false): string

Generates a keyed hash value using the HMAC method.

Parameters:

  • $algo (string)
  • $data (string)
  • $key (string)
  • $binary (bool), default false, optional

Returns: string

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how hash_hmac is implemented in the compiler, see the internals page.