Bob, your avatar looks a lot more like one of those old troll dolls from way back when than it does a dinosaur!
In this case, I'm just trying to pass the debug variable along, so security is unimportant to me.
If I were interested in securing an ini file, one thing that comes to mind is that I would use the Base64 encoding that Grovkillen suggested, and the key would be stealthily stored in the file system somewhere. For example, I might use this as the key:
Code: Select all
FileSize>%SCRIPT_DIR%\%SCRIPT_NAME%.exe,v_size1
Len>%SCRIPT_DIR%\%SCRIPT_NAME%,v_len
Let>v_key=%v_size%*%v_len%
Then, if you want to save that somewhere, just in case you change your script or something, you could obfuscate it and save that in the clear, or HTTP it to your own database for safekeeping.
None of that is crackproof, but to your clients, or snoopers, it probably will be.
Great suggestions!
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey