Retrying signature generation and making sure the hash is correct