--TEST-- Hash: hash_hmac() function : basic functionality --FILE-- getMessage() . "\n"; } echo "\n-- Testing hash_hmac() function with non-cryptographic hash algorithm --\n"; try { var_dump(hash_hmac('crc32', $data, $key)); } catch (\Error $e) { echo $e->getMessage() . "\n"; } ?> --EXPECT-- *** Testing hash_hmac() : error conditions *** -- Testing hash_hmac() function with invalid hash algorithm -- hash_hmac(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm -- Testing hash_hmac() function with non-cryptographic hash algorithm -- hash_hmac(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm