美文网首页
JAVA异或校验算法

JAVA异或校验算法

作者: AlexFelix | 来源:发表于2016-12-12 09:46 被阅读0次
public static  boolean getXOR(byte[]datas,bytecheckData){
  int result=0;
  for (int i = 0; i <datas.length; i++) { 
    result=  result^ByteToInt(datas[i]);
  }
  int data= ByteToInt(checkData);
  if (result==data){ 
    return true;
  }
  return false;
}
不要问我ByteToInt怎么写

```

相关文章

网友评论

      本文标题:JAVA异或校验算法

      本文链接:https://www.haomeiwen.com/subject/mikmmttx.html