In the bitcoin developer wallet guide, when talking about Mini Private Key Format, when they explain how the format works, they describe some steps:
The first character of mini keys is ‘S’.
In order to determine if a mini private key is well-formatted, a question mark is added to the private key.
The SHA256 hash is calculated. If the first byte produced is a `00’, it is well-formatted. This key restriction acts as a typo-checking mechanism. A user brute forces the process using random numbers until a well-formatted mini private key is produced.
In order to derive the full private key, the user simply takes a single SHA256 hash of the original mini private key. This process is one-way: it is intractable to compute the mini private key format from the derived key.
What I do not understand is step 1 and 2 combined with step 3, if a hash function such as sha256 is irreversible, this is, given its output we cannot guess its input, how is it possible that we can know that a private key that starts with 'S' and which we added a question mark will result in a hash that starts with '00' byte?
Can people extract input formats knowing that it will output certain characters in certain positions?
Is it not one of the pros of hashes that a minimum change in the input will transform the whole output?
How can someone assure that with step 1 and 2, you will get '00' byte, when if a change is made over the left hash input characters, it will completely change?