PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $xml = "test"; print($xml); $key = "\$_simplex_\$"; function encryptXML($xml='') { if(empty($xml)) $xml = $this->xml; $sKeysize = mcrypt_get_key_size(MCRYPT_3DES, MCRYPT_MODE_CFB); // 24 $sKey = str_pad($key, $sKeysize, "�", STR_PAD_RIGHT); // php5.6 이상부터 자리수 맞춰야함 print() $iv_size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_CFB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $xml = mcrypt_encrypt(MCRYPT_3DES, $sKey, $xml, MCRYPT_MODE_CFB, $iv); $this->iv = bin2hex($iv); unset($iv_size); unset($iv); return bin2hex($xml); } $xml = encryptXML($xml); print($xml);
Show:  
Copy Clear