Simplify `generateHash` method.

Arrays are passed by value, so no need to create a copy