Monday, November 08, 2010 at 12:06 AM.
system.verbs.builtins.tcp.im.builtinDrivers.aim.code.util.pwdenc
on pwdenc(adrSelf) { local { lookup = "Tic/Toc"; ept = "0x"; ctMod = sizeOf(lookup)}; local { i; ct = sizeOf(adrSelf^._passwd); letter}; for i = 1 to ct { letter = adrSelf^._passwd[i]; <<%02x means 2 char lowercase unsigned hex. <<^ is bitwise xor ept = ept + string.lower(string.mid( string.hex( bit.logicalXOR( number(letter), number( lookup[((i-1) % ctMod) +1]) )) , 5, 2))}; return (ept)}; local { tbl}; new(tableType, @tbl); tbl._passwd = "soroose"; msg(pwdenc(@tbl))
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.