Monday, November 08, 2010 at 12:06 AM.

on pwdenc(adrSelf) {
	local {
		lookup = "Tic/Toc";
		ept = "0x";
		ctMod = sizeOf(lookup)};
	local {
		ct = sizeOf(adrSelf^._passwd);
	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 {
new(tableType, @tbl);
tbl._passwd = "soroose";

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.