Method and device for mixing character string in source code
The embodiment of the invention provides a method and a device for mixing character strings in a source code. The method and the device are applied to a software development tool. The method specifically comprises the steps of compiling a to-be-mixed source code by use of a Clang tool to obtain a sy...
Saved in:
Main Author | |
---|---|
Format | Patent |
Language | Chinese English |
Published |
28.09.2018
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The embodiment of the invention provides a method and a device for mixing character strings in a source code. The method and the device are applied to a software development tool. The method specifically comprises the steps of compiling a to-be-mixed source code by use of a Clang tool to obtain a syntax tree; traversing the syntax tree to obtain a character string constant list and a character string reference list of the character string in the source code; reading a character string constant according to a position indicated in the character string constant list and encrypting the characterstring constant, and replacing an original character string constant with the encrypted character string; finding the encrypted character string according to the character string reference list, and inserting a decryption code at a position in the source code where the encrypted character string is located. Through replacement, all character string constants in the source code are converted into the encrypted character st |
---|---|
Bibliography: | Application Number: CN20181240825 |