Skip to main content

Crate internet_checksum

Crate internet_checksum 

Source
Expand description

RFC 1071 “internet checksum” computation.

This crate implements the “internet checksum” defined in RFC 1071 and updated in RFC 1141 and RFC 1624, which is used by many different protocols’ packet formats. The checksum operates by computing the 1s complement of the 1s complement sum of successive 16-bit words of the input.

Structs§

Checksum
RFC 1071 “internet checksum” computation.

Functions§

add
Updates a checksum to reflect that the bytes bytes have been added.
checksum
Compute the checksum of “bytes”.
remove
Updates a checksum to reflect that the already-checksummed bytes bytes have been removed.
update
Updates bytes in an existing checksum.