Recent years have seen numerous examples when designs play an important role in the study of such topics in cryptography as secrecy and authentication codes, secret sharing schemes, correlation-immune and resilient functions. In this paper we give applications of some methods and results from the design theory, especially bounding the optimal size of the designs and codes, to cryptography. We give a new bound for the parameter t, when (n, T, t)-resilient function and correlation-immune function of order t exist. In the last section we present analogous bound for the parameter N of T-wise independent t-resilient function.