修复问题
This commit is contained in:
parent
6cfa9c24a5
commit
36b48af67d
@ -28,6 +28,10 @@ public class SydSM4Mac {
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
public void setPcMac(String pcMac) {
|
||||
this.pcMac = pcMac;
|
||||
}
|
||||
|
||||
public void update(byte[] pcData) {
|
||||
if (null == pcData || 0 == pcData.length) {
|
||||
return;
|
||||
@ -45,15 +49,9 @@ public class SydSM4Mac {
|
||||
queue.push(pcData);
|
||||
}
|
||||
if (length % 16 != 0) {
|
||||
int remainder = length % 16;
|
||||
int intercept = length - remainder;
|
||||
byte[] result = new byte[intercept];
|
||||
byte[] result2 = new byte[remainder];
|
||||
System.arraycopy(pcData,0,result,0,intercept);
|
||||
System.arraycopy(pcData,intercept,result,0,remainder);
|
||||
queue.push(result2);
|
||||
pcdataResult=result;
|
||||
|
||||
queue.push(pcData);
|
||||
byte[] pop = queue.pop(16, 0);
|
||||
pcdataResult=pop;
|
||||
}
|
||||
if (null == this.pcMac || "".equals(this.pcMac)) {
|
||||
LongDataReturn<String, String> stringStringLongDataReturn = api.SYD_SM4Mac_LongData(iKeyIndex, pcdataResult, iPkgNum, pcProcData);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user