In electronic warfare, enemies apply many attacks to the radar systems, and try to obtain their signal information. In one type of spot jamming, the jammer accesses the structure of radar's signal. This information increases the success rate of attacks. In this paper, we propose a pulse compression method that uses the output of a block cipher as phase and frequency codes. The proposed method resists against spot jamming as the codes generated by the cipher blocks are confidential. We also use quadru-phase codes, instead of binary codes. Thus, a required level of confidentiality can be satisfied by codes with a shorter length. We investigate the probability of false alarms, autocorrelation and integrated side-lobes ratio by mathematical equations and verify them by simulation results. Results show that the proposed method provides a high level secure system with ultra-low side lobes and false alarm probability.