In large-scale networks, such as cloud computing and Internet of Things, functional encryption mechanism provides a flexible and powerful cryptographic primitive in constructing the secure transmission and communication protocols. However, as the side-channel attacks in open environments, the attacker can gain partial sensitive information from the pre-defined system by virtue of the time, power analysis, cold-boot attacks, etc. In this work, we design a leakage-resilient functional encryption scheme, which tolerates amount of bounded master-key leakage and user private-key leakage. In our scheme, encryption policies are specified as point vectors and decryption roles are defined as affine subspaces. Role delegation is implemented by specifying the affine transformation over subspaces. Our scheme achieves payload hiding and attribute hiding in the sense that the attacker is able to specify any efficiently computable leakage functions and learns the function outputs taking the master/private keys as inputs. Also, our scheme can tolerate the continual leakage for master key and private key, since we can periodically update the master key and the private key to generate a new and re-randomized key with the same distribution to the previous keys. We construct the scheme in composite-order bilinear groups and prove the security with dual system encryption methodology. We also analyze and discuss the performance of allowable leakage bound, leakage ratio and possible leakage probability. Our scheme has flexible applications in secure data communication and authorization delegation in open cloud computing systems.