HHVM is missing some SODIUM_CRYPTO_GENERICHASH_* constants.
see : https://www.php.net/manual/en/sodium.constants.php
the missing constants :
const int SODIUM_CRYPTO_GENERICHASH_BYTES = 32;
const int SODIUM_CRYPTO_GENERICHASH_BYTES_MAX = 64;
const int SODIUM_CRYPTO_GENERICHASH_BYTES_MIN = 16;
polyfill : https://github.com/nuxed/crypto/blob/master/src/Nuxed/Crypto/_Private/polyfill.hack