I’m storing a password in the player prefs file in plain text. I was wondering how hackable this is on a device? If it’s a really bad idea, anyone got any good tips on how to encrypt a password?
Can I do something with the MD5 script in the Unity Wiki??
Sending passwords over the internet or storing them unencrypted is never really nice. So yeah; you should have a look at the MD5 script and save&transfer encrypted passwords only.
problem is that md5 does not generate unique results. different passwords can lead to the same key …
thats not fully optimal too.
Also, storing the md5 does not really help for a login mechanism, as the network send commonly uses the md5 only (you never send passwords plaintext if you don’t want them to be spyed out) and as such any hacker directly has the password to send which is a no go.
I would recommend to consider things like SHA1 or AES
The likelyhood of an MD5 collision (two inputs generating the same hashcode) is astronomically unlikely. It’s not even worth considering as a possibility unless your doing military grade security.
for a game Md5 hashing is fine. But storing the MD5 hash opposed to the password doesn’t grant you any better security, they still have what they need to log into your system.
I’d stay away from encryption unless you want to be prevented from world wide distribution and other legal issues with exporting encryption enabled software.
Just store the password “obfuscated” with something like UUEncode or some other reversable cheesy encryption.