ObfuscateMacro
ObfuscateMacro copied to clipboard
how to use
Hello, may I ask if there are any examples used in engineering? I am not quite sure how to use them.
Simply add it as a swift package to the dependencies and then replace it with the following
import ObfuscateMacro
let text = "hello"
// ↓↓
let text = #ObfuscatedString("hello")
Didn't work well?
Yes, thank you. I now know how to use it. At first, I was not sure about the principle behind it, so I spent a lot of time researching. It would be great if there could be a brief explanation of the principle behind it in markdown.
@sjustfly
Yes certainly, I agree with you.
Since the source code itself is compiled after the macros are expanded, the only data left on the actual binary is after obfuscation. Each time a string is retrieved, it is decoded. Also, the macro changes the seed used for obfuscation each time it is executed.
I think these are the main principles.
I welcome pull requests to update the README if you would like to do so.
Thanks.