zsh_root
2025-12-10 8d662de2fd262b3a485f16e197cb4d0ca2a61cdf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package Ymodem;
 
/**
 * Created by asirotinkin on 11.11.2014.
 */
public class CRC8 implements CRC {
    @Override
    public int getCRCLength() {
        return 1;
    }
 
    @Override
    public long calcCRC(byte[] block) {
        byte checkSumma = 0;
        for (int i = 0; i < block.length; i++) {
            checkSumma += block[i];
        }
        return checkSumma;
    }
 
}