There are schemes for this, but it requires much more than just a hash. You need not only asymmetric cryptography, but some sort of Zero Knowledge Proof if you don’t want to be able to identify the person who voted.