hash: fix incompatible function pointer cast
The code was casting a void(*)(struct apk_name *)
function to void(*)(void *)
and then to int(*)(void *, void *)
and called it. This worked with luck
and a hacky ctx != NULL
check but it is undefined behaviour [citation needed].