return 0 == memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE)
I mean, as I read it, the function returns true if they don't match?