sing-tun-lx/gtcpip/checksum/checksum_default.go
2026-07-27 23:11:48 +08:00

12 lines
379 B
Go

//go:build !amd64
package checksum
// Checksum calculates the checksum (as defined in RFC 1071) of the bytes in the
// given byte array. This function uses an optimized version of the checksum
// algorithm.
//
// The initial checksum must have been computed on an even number of bytes.
func Checksum(buf []byte, initial uint16) uint16 {
return ChecksumDefault(buf, initial)
}