Add testhash function, since we experienced troubles here.