Mash soft beancurd through a metal sieve until it turns into a fine paste. Combine this paste with the preserved fermented red beancurd, five spice powder, salt and water.
Add flour, baking powder, sugar, egg and sesame seeds. Mix and knead into a smooth dough. Cover the dough and leave to rest for an hour.
Roll out the dough thinly. Use a sharp knife to cut the dough into 1cm x 4cm strips. Place 2 pieces together then make a small slit in the centre with a pair of sharp scissors. Take one end and slip it through the slit. Pull out lightly to make a twist.
Deep-fry the pieces of twisted pastry dough in hot oil over medium heat until they turn golden.
Remove immediately from the oil and drain on several layers of kitchen paper. Store them in airtight containers when cooled.