作者 王智

RSA1

... ... @@ -185,6 +185,16 @@ class Cards extends Backend
}
$Api = new SetCode();
foreach ($insert as $k => $v) {
if (strlen($v['mobile']) != 11) {
$this->error('手机号错误', $v['mobile']);
die;
}
if (strlen($v['CardsNum']) != 18) {
$this->error('身份证号错误', $v['CardsNum']);
die;
}
}
foreach ($insert as $k => $v) {
// $v['CardsNum'] = substr($v['CardsNum'], 1);
$insert[$k]['mobile'] = $Api->encrypt($v['mobile']);
$insert[$k]['CardsNum'] = $Api->encrypt(substr($v['CardsNum'], 7));
... ...