Convert to binary and convert back to strings

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Thu Feb 22 16:04:54 EST 2007


On Thu, 22 Feb 2007 11:55:22 +0000, Jussi Salmela wrote:

>> For extra security, you can encode the string with rot13 twice.
>> 
>> 
>> 
> 
> Like this? ;)
> 
>  >>> s = "Python" ; u = unicode(s, "ascii") ;  u
> u'Python'
>  >>> u.encode('rot13')
> 'Clguba'
>  >>> u.encode('rot13').encode('rot13')
> 'Python'


Exactly! People will think that you're using some terribly advanced
encryption algorithm that looks like plain text, and think "anything that
clever is way too clever for me" and just give up.


-- 
Steven.




More information about the Python-list mailing list