Quantcast
Channel: Securing a password in source code? - Stack Overflow
Browsing latest articles
Browse All 11 View Live

Answer by Will for Securing a password in source code?

I actually consider using the "protected sections" feature in App.Config or Web.Config to be LESS secure than storing the password in your code. Anyone with server access can decrypt that section of...

View Article



Answer by badbod99 for Securing a password in source code?

Don't store you password in your source code, store it in a protected section within you App.Config (or Web.Config). See Encrypting Configuration File Sections Using Protected Configuration section in...

View Article

Answer by Steve Danner for Securing a password in source code?

You could use something like SLP Code Protector to block reverse engineering of your assemblies. Still, I agree with everyone else, it's not the best idea.

View Article

Answer by Erik van Brakel for Securing a password in source code?

There's not much you can do against someone who really wants your password. However, if this isn't a public app (intranet? in-house app or something) you could simply encrypt it using a symmetric...

View Article

Answer by djTeller for Securing a password in source code?

Don't save your password in the source code. Read this: http://en.wikipedia.org/wiki/Security_through_obscurity There is no good way. All you can do is use a smart algorithm to encrypt the password. An...

View Article


Answer by winwaed for Securing a password in source code?

Encrypt it with something strong like AES, but as implied by SLaks, your attacker can reverse engineer your code and work out the encryption method and key. All you are doing is adding a layer which...

View Article

Answer by Mitch Wheat for Securing a password in source code?

Best way is don't! Failing that: Encrypting Configuration File Sections Using Protected Configuration

View Article

Answer by Andrew M for Securing a password in source code?

You can put it as an encrypted value in the web.config file. It doesn't look too hard: K scott Allen tutorial...

View Article


Answer by Nick Martyshchenko for Securing a password in source code?

There are no "best way" to store password in source code since it can be recovered in many ways. You can obfuscate password string or even encrypt it to prevent reveal thru simple viewing but it can't...

View Article


Answer by SLaks for Securing a password in source code?

Don't bother. Anything you can do, your attacker can trivially undo. If it only needs to run on a single machine, however, you can use the ProtectedData class, which will protect it securely against...

View Article

Securing a password in source code?

I have a password in my code which is needed to connect to a sftp server. Whats the best way to "obfuscate" or hide it in the code? Thanks

View Article
Browsing latest articles
Browse All 11 View Live




Latest Images