package
Version:
v0.0.0-...-8956429
Opens a new window with list of versions in this module.
Published: Nov 25, 2013
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package bsdsum implements the SYSV checksum algorithm
SYSV checksum is also known as UNIX SYStem V checksum, sum -s
The size of an SYSV checksum value
New returns a new hash.Hash computing the SYSV checksum value
c := New()
io.WriteString(c, "Go is an open source programming environment.")
fmt.Printf("sum: %d", c.Sum16())
Output:
sum: 4330
Sysvsum returns the SYSV checksum value of a given byte array
data := []byte("Go is expressive, concise, clean, and efficient.")
fmt.Printf("sum: %d", Sysvsum(data))
Output:
sum: 4377
Source Files
¶
Click to show internal directories.
Click to hide internal directories.