- 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 的错误? 知道的教小弟一声!
|