def roast(pw): # contributed by jemfinch on #python key="Tic/Toc" ro="0x" i=0 ascii=map(ord,pw) for c in ascii: ro=ro+'%02x'%(c^ord(key[i%len(key)])) i=i+1 return string.lower(ro)