Just a small note:
SHA-256 produces a unique hash. The chances that you would ever obtain two identical patterns of ones and zeros for two different inputs is zero (is it actually zero or a negligible small number?). Because of the uniqueness of our hash function output, we can use it as a digital signature.
- A good hashing function should be collision resistant. This means, no two different inputs should produce the same output.
In most, if not all cases, and particularly in SHA-256, there are many inputs which produce the same output. This is inevitable since the size of the domain is greatly larger than the size of the target. So the chances that two different inputs would produce the same hash is greater than zero. However, as you correctly noted, the chances are so small, that practically they are considered to be zero.