永发信息网

怎样由字符数组生成secretkey

答案:1  悬赏:50  手机版
解决时间 2021-04-06 21:31
  • 提问者网友:疯孩纸
  • 2021-04-06 08:16
怎样由字符数组生成secretkey
最佳答案
  • 五星知识达人网友:酒者煙囻
  • 2021-04-06 08:33
public static String getSecret(byte[] b){//得到密文
String string="";
int c=b.length/6;
int last=b.length%6;
int point=0;
int temp=0;
for(int i=0;ifor(int j=6;j>0;j--){
int temp1=Integer.valueOf(b[point])-48;
int z=0;
while(ztemp1=temp1*2;
z++;
}
point++;
temp=temp+temp1;
}
String string2=String.valueOf((char)temp);
string=string+string2;
temp=0;
}
for(;last>0;last--){
int z=0;
int temp1=Integer.valueOf(b[point])-48;
while(ztemp1=temp1*2;
z++;
}
point++;
temp=temp+temp1;
}
String string2=String.valueOf((char)temp);
string=string+string2;
return string;
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯