-
Notifications
You must be signed in to change notification settings - Fork 1
号码脱敏处理
号码编码处理流程。联系我们NOC提供一个salt盐值作为编码盐值,使用下面程序代码对号码进行编码后发送到客户端或者在客户端使用编码后的号码拨打,真实号码会被编码成另外一个号码来发起呼叫,这样可以防止号码外泄。
public static String aaas(Long phone,Long salt) { String phoneStr = phone+""; int len=phoneStr.length(); String prefix=""; int suffix=0; if(len>8){ prefix=phoneStr.substring(0,len-8); phoneStr=phoneStr.substring(len-8); phone = Long.valueOf(phoneStr); suffix=8-phone.toString().length(); }else{ phone = Long.valueOf(phoneStr); suffix=len-phone.toString().length(); } Long newphone = (phone & 0xff000000); newphone = (phone & 0xff000000); newphone += (phone & 0x0000ff00) << 8; newphone += (phone & 0x00ff0000) >> 8; newphone += (phone & 0x0000000f) << 4; newphone += (phone & 0x000000f0) >> 4; newphone ^= salt; return prefix+""+newphone+""+suffix+""+newphone.toString().length(); }
function encode_phone(phone,salt){ len=phone.toString().length; prefix=""; suffix=0; if(len>8){ prefix=phone.toString().substr(0,len-8); phone=phone.toString().substr(len-8); suffix=8-parseInt(phone).toString().length; phone=parseInt(phone); }else{ phone=parseInt(phone); suffix=len-phone.toString().length; } newphone = (phone & 0xff000000); newphone += (phone & 0x0000ff00) << 8; newphone += (phone & 0x00ff0000) >> 8; newphone += (phone & 0x0000000f) << 4; newphone += (phone & 0x000000f0) >> 4; newphone ^= salt; return prefix+""+newphone+""+suffix+""+newphone.toString().length; }
function encode_phone($phone,$salt) { $len=strlen($phone); $prefix=""; $suffix=0; if($len>8){ $prefix=substr($phone,0,$len-8); $phone=substr($phone,$len-8); $phone=(int)$phone; $suffix=8-strlen($phone); }else{ $phone=(int)$phone; $suffix=$len-strlen($phone); } $newphone = ($phone & 0xff000000); $newphone += ($phone & 0x0000ff00) << 8; $newphone += ($phone & 0x00ff0000) >> 8; $newphone += ($phone & 0x0000000f) << 4; $newphone += ($phone & 0x000000f0) >> 4; $newphone ^= $salt; return $prefix.$newphone.$suffix.strlen($newphone); }
Introduction
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
AI Agent(NXLink)
- AI Agent Task List
- Query Call Records
- Append Contacts to an Existing Task
- Delete Contacts
- Call Record Callback
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测