port tests from nettle/testsuite
simplify generation of [algo]_hash and [algo]_hmac