Generates a hash based on function arguments