Buffalo chicken

Ingredients:
1 ½kg chicken thighs and drumsticks, 180g sea salt flakes, 90g soft dark brown sugar, 2 tbsp chilli flakes