The invention provides a code
encryption method and device,
electronic equipment and a computer readable storage medium. The code
encryption method comprises the following steps: compiling a
source code to generate an original intermediate file; extracting
byte code information in the original intermediate file, with
byte code information comprising one or more original instructions; interceptingone or more original instructions in the
bytecode information, filtering the one or more original instructions according to instruction characteristics of a constant character string obtained in advance, and obtaining a
plaintext constant character string corresponding to the original instruction containing the instruction characteristics in the one or more original instructions; performing
encryption processing on the
plaintext constant character string to obtain an encrypted constant character string; and replacing the
plaintext constant character string with the encrypted constant characterstring, and inserting a decryption
processing code corresponding to the encryption
processing to obtain an encrypted intermediate file. According to the embodiment of the invention, the
security level of the application program is improved, and the efficiency of searching encryption processing is improved.