Safe Haskell | None |
---|---|
Language | Haskell2010 |
A module providing checksum computations to other parts of Hans. The checksum here is the standard Internet 16-bit checksum (the one's complement of the one's complement sum of the data).
- computeChecksum :: Checksum a => a -> Word16
- class Checksum a where
- data PartialChecksum
- emptyPartialChecksum :: PartialChecksum
- finalizeChecksum :: PartialChecksum -> Word16
- stepChecksum :: Word32 -> Word8 -> Word8 -> Word32
- data Pair8 = Pair8 !Word8 !Word8
Checksums
computeChecksum :: Checksum a => a -> Word16 Source #
class Checksum a where Source #
Incremental checksum computation interface.
extendChecksum :: a -> PartialChecksum -> PartialChecksum Source #