Reputation: 123
Is it secure to have a password as a plain string in the c# code? I will only have one user that will use the login feature. Thank you.
Upvotes: 4
Views: 1691
Reputation: 9725
No it isn't secure, as the others have already said, it's not a complicated matter to decompile a dll etc and retrieve the source code...
Perhaps you could look into putting it an an app key in the web.config file and encrypt that using IIS... Have a read of this Microsoft walkthrough for encrypting the web.config connection string
Upvotes: 3
Reputation: 607
No, it's not safe. Many decompilers like reflectors can easily retrieve the password, main reason for it is code can be easily decompiled.
Upvotes: 1