Android Byte Array Checksum checkSum(byte[] bytes)

Here you can find the source of checkSum(byte[] bytes)

Description

check Sum

Declaration

public static byte checkSum(byte[] bytes) 

Method Source Code

//package com.java2s;

public class Main {
    public static byte checkSum(byte[] bytes) {
        byte sum = 0;
        for (byte b : bytes) {
            sum ^= b;//w  w  w.  j a v  a2s . c  o  m
        }

        return sum;
    }
}

Related

  1. checkSum(byte[] data)
  2. checkSum2(byte[] data)
  3. checkSum(byte[] cmdPackage)