As for different level side-channel leakages, a general side-channel leakage-tolerated model is proposed and a formal description is given by entropy theory. This model adopts (t,n) threshold leakage mechanism, and thus the security do not compromise with partial side-channel leakages. Based on the proposed model, a two-phase masking method is utilized to build leakage-tolerated Advanced Encryption Standard (AES-128). Compared with the conventional countermeasures, this method can resist higher-order side-channel attack and template attack simultaneously. The effectiveness of this method is verified by theoretical analysis and simulation.