If my DD smacks, hits, bites me I will make a sad face and say Mummy doesn't like DD hitting me. It hurts me and makes me sad. Mummy doesn't hit DD so please don't hit Mummy.
If she is hitting, bites, kicks other kids instead of giving her heaps of attention I turn to the person she hurt and say something like DD look at *insert name* she looks so sad (make a bit of a fuss over the person that got hurt). I find most of the time if she hits or something it's to get attention so if she doesn't get it but the person that she actually hurts gets it she soon realises it's not working.
If she is doing something that I don't want her to do. I ask her not to do it and I always explain why.
IMO there is always a better way to teach them right from wrong then hitting. Hitting is wrong to do to adults and animals so why is it ok to hit our children when there naughty? What happened to communication and patience...
ETA - for a one year old. They dont understand that there hitting or hurting you. There not trying to be naughty they are too innocent. I would just do the same. Make a sad face and say ouch that hurt mummy.