Thread Checksum CRC8 Berechnung (5 answers)
Opened by Lauvia at 2015-05-27 12:20

GwenDragon
 2015-05-29 13:25
#181211 #181211
User since
2005-01-17
14747 Artikel
Admin1
[Homepage]
user image
Benutz doch das Modul Digest::CRC.
Code (perl): (dl )
1
2
3
4
my $data = "123456789";

use Digest::CRC qw(crc8);
my $crc = crc8($data);


Ich hoffe das passt bei deinem Polynom.
Ungetestet.
Code (perl): (dl )
1
2
3
4
5
6
7
my $data = "123456789";

use Digest::CRC qw(crc);
# name,    [width, init, xorout, refout, poly, refin, cont);
#  crc8 => [8,     0,    0,      0,      0x07, 0,     0],
# deins => [8,     0xFF, 0,      0,      0x2F, 0,     0]
my $crc = crc($data,8,0xff,0,0,0x2F,0,0);



Oder muss das ohne Modul gehen?
Last edited: 2015-05-29 13:33:05 +0200 (CEST)

View full thread Checksum CRC8 Berechnung