In this paper we would like to give a new example of the fact that ideas of coding theory sometimes find unexpected applications in cryptology. Our example is based on new notions of k-Walsh-Hadamard transform for a Boolean function and k-bent function (here k is integer, 1 les k les m/2, m is an even number of variables), which we introduce. These notions appeared at first as geometric images of coding theory. But soon they found applications in cryptanalysis. Using these notions we study special quadratic approximations in block ciphers and prove that by using k-bent functions in a cipher it is possible to make it resistant to these approximations.