PHP开发实例大全(提高卷) 中文完整pdf扫描版[244MB]
//php加密函数
public function encypt_text($text) {
$key = "ShitAndFuck";
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = md5($key);
$ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_ECB);
$base64encoded_ciphertext = base64_encode($ciphertext);
return $base64encoded_ciphertext;
}