You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
580 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SLH.SSDMS.Common
{
public class checkUtil
{
/// <summary>
/// 异或校验
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static int BCC(byte[] data)
{
int temp = 0;
for (int index = 0; index < data.Length; index++)
{
temp = temp ^ data[index];
}
return temp;
}
}
}