csum16

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package csum16 computes the 16 bit Internet checksum.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sum

type Sum uint16

Sum stores the partially computed checksum.

func (Sum) BlockSize

func (Sum) BlockSize() int

BlockSize returns the hash's underlying block size.

func (*Sum) Reset

func (s *Sum) Reset()

Reset resets the hash to its initial state.

func (Sum) Size

func (Sum) Size() int

Size returns the number of bytes Sum will return.

func (Sum) Sum

func (s Sum) Sum(b []byte) []byte

Sum appends the current hash to b and returns the resulting slice.

func (Sum) Sum16

func (s Sum) Sum16() uint16

Sum16 returns the current value of the checksum.

func (*Sum) Write

func (s *Sum) Write(p []byte) (n int, err error)

Write computes the checksum over a series of bytes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL