below follows the fwPack code in PHP.. fwUnpack is coming -Sean
<% function fwPack($pData, $pPassword="") { if ($pPassword === ""): $pData = "00" . gzencode($pData); else: $tKeyString = pack("H*", md5($pPassword)); $tKeyStringLen = strlen($tKeyString); $pData = gzencode($pData); $tDataLen = strlen($pData); $tCryptoText = ""; $i = 0; for ($k=0; $k < $tDataLen; $k++): if ($i >= $tKeyStringLen): $i = 0; endif; $tCryptoText .= chr( ord($pData{$k}) ^ ord($tKeyString{$i}) ); $i++; endfor; $pData = "01" . $tCryptoText; endif; return base64_encode($pData); } // end fwPack echo fwPack("functions", "fred"); %> _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution