You don't need any hash value, text before the triple --- is ignored.
There are a number of ways/diff commands to create a patch and they can all work. Which one are you using?
The problem you seem to be having is just a path problem. The "patch" command has a fairly elaborate algorithm to find the file to patch (see patch(1): apply diff file to original - Linux man page) but in practice the problem is usually just an incorrect number of subdirectories. Change directory before running your diff command until the number of directories at the start of your output follows the example of working patches. Also have a look the error in the file pointed by the error message you quoted.