Hashing

Fletcher Checksum Calculator

Fletcher is a fast non-cryptographic checksum built from two running sums: sum1 adds each word, sum2 adds each sum1, and the checksum is the two concatenated. Used in TCP , SCTP and OSI IS-IS . Feed it text or raw hex bytes — abcde should give Fletcher-16 0xC8F0 .

Input0 bytes
encoded as UTF-8
Try
Fletcher-16
0x0000
0 decimal
0000000000000000
sum2high 8 bits
0x000
mod 255
sum1low 8 bits
0x000
mod 255

(sum2 << 8) | sum1 = (0 × 256) + 0

Folds one byte at a time, modulo 255.

Fletcher-32
0x00000000
0 decimal
00000000000000000000000000000000
sum2high 16 bits
0x00000
mod 65535
sum1low 16 bits
0x00000
mod 65535

(sum2 << 16) | sum1 = (0 × 65,536) + 0

Folds 16-bit words, modulo 65535.

Checksumsclick copy to take a value away
Fletcher-16
0x0000
Fletcher-32
0x00000000
Adler-32
0x00000001
Bytes
0
UTF-8 encoded
16-bit words
0
no padding needed
Fletcher-16
0x0000
0
Fletcher-32
0x00000000
0
Compared with Adler-32same two-sum shape, different parameters
AlgorithmWordModulusInitialSum1Sum2Checksum
Fletcher-168-bit2550, 0000x0000
Fletcher-3216-bit655350, 0000x00000000
Adler-328-bit655211, 0100x00000001

Adler-32 uses a prime modulus and starts sum1 at 1, so a run of leading zero bytes still changes its result — Fletcher, starting both sums at 0, does not.

no input

Those are the real checksums of an empty message — both Fletcher sums start at 0, while Adler-32 starts sum1 at 1. Type something to see the trace.

Share

marduc812

© 202620260824_1c411cc