33 lines
831 B
Go
33 lines
831 B
Go
/*
|
|
Package inetcksum applies the "Internet Checksum" algorithm as specified/described in:
|
|
|
|
* [RFC 1071]
|
|
* [RFC 1141]
|
|
* [RFC 1624]
|
|
|
|
It provides [InetChecksum], which can be used as a:
|
|
|
|
* [hash.Hash]
|
|
* [io.ByteWriter]
|
|
* [io.StringWriter]
|
|
* [io.Writer]
|
|
* [io.WriterTo]
|
|
|
|
and allows one to retrieve the actual bytes that were checksummed.
|
|
It is also fully concurrency-safe.
|
|
|
|
There is also an [InetChecksumSimple] provided, which is more
|
|
tailored for performance/resource usage at the cost of no concurrency
|
|
safety and no data retention, which can be used as a:
|
|
|
|
* [hash.Hash]
|
|
* [io.ByteWriter]
|
|
* [io.StringWriter]
|
|
* [io.Writer]
|
|
|
|
[RFC 1071]: https://datatracker.ietf.org/doc/html/rfc1071
|
|
[RFC 1141]: https://datatracker.ietf.org/doc/html/rfc1141
|
|
[RFC 1624]: https://datatracker.ietf.org/doc/html/rfc1624
|
|
*/
|
|
package inetcksum
|