helper function to create a packet with hash request