/** * singleton getter * * @param void * @return PApps */ public static function enc($function, $ss) { require_once SCRIPT_BASE . 'inc/enc.inc.php'; switch ($function) { case 'CryptA': return CryptA($ss); case 'CryptM': return CryptM($ss); case 'DeCryptA': return DeCryptA($ss); case 'DeCryptM': return DeCryptM($ss); default: return false; } }
function GetCryptM($ss, $IsCrypted = "crypted") { // LogStr(" entering GetCryptM(\"".addslashes($ss)."\",\"".$IsCrypted."\")","JYH") ; switch ($IsCrypted) { case "crypted": case "always": if (strstr($ss, "<membercrypted>") !== false) { return $ss; } // todo add right test return "<membercrypted>" . CryptM($ss) . "</membercrypted>"; break; case "not crypted": return strip_tags($ss); break; default: // we should never come here $strlog = "FunctionsCrypt.php:: function GetCryptM() Problem to encrypt " . $ss . " IsCrypted=[" . $IsCrypted . "]"; if (function_exists(LogStr)) { LogStr($strlog, "Bug"); } if (function_exists(bw_error)) { bw_error($strlog); } else { error_log($strlog); } die("Major problem with crypting issue"); } // end of switch }