|
|
|
@ -603,6 +603,12 @@ function encryptStr($str) {
|
|
|
|
|
return substr_replace($str, $stars_str, 3, $length-6);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 身份证加密
|
|
|
|
|
*
|
|
|
|
|
* @param $str
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
function encryptIdCard($str) {
|
|
|
|
|
$length = strlen($str);
|
|
|
|
|
$stars_str = "";
|
|
|
|
@ -610,4 +616,19 @@ function encryptIdCard($str) {
|
|
|
|
|
$stars_str = "****";
|
|
|
|
|
}
|
|
|
|
|
return substr_replace($str, $stars_str, $length-4, 4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 真实名字加密
|
|
|
|
|
*
|
|
|
|
|
* @param $str
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
function encryptRealName($str) {
|
|
|
|
|
$length = strlen($str);
|
|
|
|
|
$stars_str = "";
|
|
|
|
|
if($length>=4){
|
|
|
|
|
$stars_str = "****";
|
|
|
|
|
}
|
|
|
|
|
return substr_replace($str, "**", 3, $length);
|
|
|
|
|
}
|