Obfuscate strings in Python

Posted by Caedis on Stack Overflow See other posts from Stack Overflow or by Caedis
Published on 2009-06-11T16:47:30Z Indexed on 2010/03/29 12:43 UTC
Read the original article Hit count: 321

I have a password string that must be passed to a method. Everything works fine but I don't feel comfortable storing the password in clear text. Is there a way to obfuscate the string or to truly encrypt it? I'm aware that obfuscation can be reverse engineered, but I think I should at least try to cover up the password a bit. At the very least it wont be visible to a indexing program, or a stray eye giving a quick look at my code.

I am aware of pyobfuscate but I don't want the whole program obfuscated, just one string and possibly the whole line itself where the variable is defined.

Target platform is GNU Linux Generic (If that makes a difference)

© Stack Overflow or respective owner

Related posts about obfuscation

Related posts about python