Well, that will depend on the hashing algorithm - but I would be surprised to see that something would clearly prevent this. In the end, it really doesn't matter.
I suspect this is very unlikely, of course (for cryptographic hashes) ... but even so, this should not cause a problem.
For non-critical hashes (used in hash tables, etc.) it would be wise to return the original value in some cases. For example, in Java, Integer.hashCode() simply returns an inline value.
source share