CMPP3.0 中CMPP_CONNECT 的AuthenticatorSource 算法 有何问题?

sw245711601 2013-01-10 01:43:13

private static byte[] getAuthenticatorSource(String Source_Addr,
String Shared_Secret, String Timestamp) throws Exception{
byte abyte2[] = new byte[100];
byte abyte1[]={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
byte abyte3[] = new byte[16];
MD5 md5 = new MD5();
System.arraycopy(Source_Addr.getBytes(), 0, abyte2, 0, Source_Addr.length());
int l = Source_Addr.length();
System.arraycopy(abyte1, 0, abyte2, l,abyte1.length);
l +=9;
System.arraycopy(Shared_Secret.getBytes(), 0, abyte2, l, Shared_Secret.length());
l +=6;
System.arraycopy(Timestamp.getBytes(), 0, abyte2, l, Timestamp.length());
md5.update(abyte2);
md5.md5final(abyte3);
return abyte3;
}

为什么总是返回认证错 status 3 的错误? 知道的教小弟一声!
...全文
134 回复 打赏 收藏 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

62,620

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧