Difference of hypocrisy and cognitive dissonance

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