quote:
Originally posted by ProtoZoa
Whats the best way to handle user passwords? Encrypted in registry?
Yes, and saved under the user's 'User ID' under the script's settings path.
The user ID is the number you get with
Messenger.MyUserId.
The registry path would therefore be:
MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\pwd"
giving:
HKEY_CURRENT_USER\Software\Patchou\Messenger Plus! Live\GlobalSettings\Scripts\<YourScriptName>\<1234567890>
where <1234567890> is that User ID and pwd the name of the key value.
Although storing the pwds encrypted with scripts isn't fool proof (one can always dive into the script source and find out the encryption algorithm) it is way better than storing it in plain text. As such, the encryption doesn't need to be very strong though, just strong enough so that one can't derive/guess the plain password from the encrypted text. You could use the Windows Cryptographic APIs for that, but you could also make your own encryption scheme for example (using XOR calculations, ROT, and other stuff like that)