| Title: | Compute Fletcher Checksums (16, 32, and 64 Bit) |
|---|---|
| Description: | Computes Fletcher's position-dependent checksum in 16-, 32-, and 64-bit widths. Fletcher's checksum, devised by John G. Fletcher, provides error-detection properties approaching a cyclic redundancy check at lower computational cost. Input is processed as little-endian words with the final partial word zero-padded, so results are reproducible across platforms. |
| Authors: | Christos Longros [aut, cre] |
| Maintainer: | Christos Longros <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-15 20:45:56 UTC |
| Source: | https://github.com/cran/fletcher |
Computes Fletcher's position-dependent checksum. Input is processed as little-endian words with the final partial word zero-padded, so the result is reproducible across platforms.
fletcher(x, width = 32L)fletcher(x, width = 32L)
x |
A character string, a raw vector, or an integer/numeric vector of
byte values (0-255) coercible with |
width |
Checksum width in bits; one of |
A lowercase hexadecimal string of width / 4 characters.
fletcher("abcde", 16) # "c8f0" fletcher("abcde", 32) # "f04fc729" fletcher("abcde", 64) # "c8c6c527646362c6"fletcher("abcde", 16) # "c8f0" fletcher("abcde", 32) # "f04fc729" fletcher("abcde", 64) # "c8c6c527646362c6"