<?php
	if (!extension_loaded('infosec'))
       {
		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
		{
			dl('php_infosec.dll');
		}
		else
		{
			dl('infosec.so');
		}
	}
	else
	{
		echo "load infosec module success<br/>";
  	}
	if(isset($_POST["base64enc"]))
	{
		$data=$_POST["plaint"];
		if(strlen($data) <= 0)
		{
			echo "WARNING : no input data<br/>";
		}
		else
		{
			$base64enc = base64enc($data);
			#echo $base64enc;
			$code = current($base64enc);
			$len = next($base64enc);
			echo "base64 encode : ",$code,"<br/>";
			echo "base64 encode len: ",$len,"<br/>";
		}
	}
	exit();
?>
