This invention discloses an embedded data
obfuscation method based on
Java reflection, relating to the field of sensitive
data processing technology. To address the problems of sensitive data being easily decompiled and leaked,
obfuscation logic being rigid, and high
resource consumption in
Java embedded applications, this invention implements a six-step process using
Java reflection: initializing the
obfuscation context, dynamically acquiring sensitive data, multi-dimensional dynamic obfuscation operations, embedded data storage, runtime dynamic deobfuscation, and self-
verification protection. A dynamic key is generated using device identifier, class hash value, and
timestamp, combined with segmented XOR, bitwise obfuscation, and Base64
encryption. The obfuscated data is embedded in a class constant
pool and decrypted in runtime memory, while also possessing anti-tampering self-
verification capabilities. Figure 1 is a
schematic flowchart of the method of this invention. This invention has the advantages of being lightweight, having no external dependencies,
high security, and adapting to embedded environments, making it suitable for
data security protection of Java embedded devices and IoT terminals.