On 2007-02-22, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-02-22, Ganesan Rajagopal <[EMAIL PROTECTED]> wrote:
>
>>> I am hoping to have it show up some weird un-readable text.
>>> And then of course be able to convert it right back to a
>>> string. Is this even possible?
>>
>> Looks like you just want to obfuscate the string. How about
>> this?
>>
>> import base64
>> text = 'supercalifragilisticexpialidocius'
>> open('sambleb.conf', 'w').write(base64.encodestring(text))
>>
>> print base64.decodestring(open('sambleb.conf', 'r').read())
>
> It'll only remain obfuscated for about 30 seconds after even a
> mildly curious user looks at the file.

I should add that even "strong" encryption will only slow down
a curious user by 10 minutes if the encryption/decryption key
is embedded in the program...

Trying to hide things from users is usually futile unless you
want put a lot of work into it...

-- 
Grant Edwards                   grante             Yow!  Do you have exactly
                                  at               what I want in a plaid
                               visi.com            poindexter bar bat??
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to