What is the difference between hypocrisy and cognitive dissonance? How are these concepts similar?

Given what we now know about the links between attitudes and behavior, what is the difference between hypocrisy and cognitive dissonance? How are these concepts similar?