摘要 |
A method of providing encryption and decryption of plaintext strings in a program file, includes: at a device having one or more processors and memory: marking each of a plurality of plaintext strings in a source file with a respective marking macro (e.g. Decrypt); scanning (e.g., using a reflection tool) for the respective marking macros to identify the plurality of plaintext strings in the source code; generating a respective ciphertext string for each of the plurality plaintext strings that have been identified; and storing the plurality of plaintext strings in a dictionary file, where each plaintext string is indexed by a respective hash value computed from plaintext string, and where the respective hash value for each of the plaintext strings is used to retrieve the respective ciphertext string of the plaintext string from the dictionary during program execution. |