I don't understand — the example in the article adds the string "magic: MTQIpN2AmwQA" to the commit message. The final hash is hexadecimal, but what you feed into it isn't.
"it" (in "it matches the hash") = "the next sequential number", not "the commit message", afaict. Not very clear, I agree.