array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.sodium-crypto-shorthash.php', 1 => 'sodium_crypto_shorthash', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Funktionen', ), 'prev' => array ( 0 => 'function.sodium-crypto-shorthash-keygen.php', 1 => 'sodium_crypto_shorthash_keygen', ), 'next' => array ( 0 => 'function.sodium-crypto-sign-detached.php', 1 => 'sodium_crypto_sign_detached', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-shorthash.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_shorthash — Compute a short hash of a message and key
sodium_crypto_shorthash() wraps a hash function called SipHash-2-4, which is ideal for implementing hash tables that are not susceptible to hash collision denial of service attacks (Hash-DoS).
SipHash-2-4 isn't a general purpose cryptographic hash function.
message
The message to hash.
key
The hash key.