How was Mad Eye Moody (AKA Eeath Eater Barty Crouch Jr.) able to hoodwink the Goblet which Dumbledore himself had charmed? In GOF, we are made to believe that the Goblet is guarded by all too powerful magic done by none other than Albus Dumbledore himself. Then how come Barty Crouch Jr. able to hoodwink it and enter Harry's name in it? He surely can't be more powerful than Dumbledore himself?

Is there any place in the canonical text (or author's remarks) where the exact methods of undoing the age restrictions is mentioned?