|
@@ -209,26 +209,8 @@ public class TokenController {
|
|
|
logger.error("学习机登录,加密前:" + username + ",设备编码:" + machineCode);
|
|
logger.error("学习机登录,加密前:" + username + ",设备编码:" + machineCode);
|
|
|
if (UserConstants.USER_LOGIN_HXP == aioType) {
|
|
if (UserConstants.USER_LOGIN_HXP == aioType) {
|
|
|
// TODO 终端传参数据有问题,暂临时后端处理
|
|
// TODO 终端传参数据有问题,暂临时后端处理
|
|
|
- String[] userchar = username.split("");
|
|
|
|
|
- String placeholder = "";
|
|
|
|
|
- for(int i=0;i<userchar.length;i++){
|
|
|
|
|
- if(i==0){
|
|
|
|
|
- if(userchar[i].equals("0")){
|
|
|
|
|
- placeholder+="0";
|
|
|
|
|
- }else{
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }else{
|
|
|
|
|
- if(userchar[i].equals("0")){
|
|
|
|
|
- placeholder+="0";
|
|
|
|
|
- }else{
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- long num = Long.parseLong(username,16);
|
|
|
|
|
//通过des生成对称加密卡号
|
|
//通过des生成对称加密卡号
|
|
|
- username = DESUtils.encrypt(placeholder+""+num+"");
|
|
|
|
|
|
|
+ username = DESUtils.encrypt(DESUtils.completeMissing(username));
|
|
|
|
|
|
|
|
// username = username.replaceAll("%00", "")
|
|
// username = username.replaceAll("%00", "")
|
|
|
// .replaceAll("%02", "")
|
|
// .replaceAll("%02", "")
|