cksum

package
v0.0.0-...-8956429 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2013 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cksum implements the legacy unix core util cksum cksum is also known as POSIX cksum, UNIX cksum

Index

Examples

Constants

View Source
const Size = 4

The size of a cksum value

Variables

This section is empty.

Functions

func Cksum

func Cksum(data []byte) uint32

Cksum returns the cksum value of a given byte array

Example
data := []byte("Go is expressive, concise, clean, and efficient.")
fmt.Printf("cksum: %d", Cksum(data))
Output:

cksum: 1937373249

func New

func New() hash.Hash32

New returns a new hash.Hash computing the cksum value

Example
c := New()
io.WriteString(c, "Go is an open source programming environment.")
fmt.Printf("cksum: %d", c.Sum32())
Output:

cksum: 3621830076

Types

This section is empty.

Jump to

Keyboard shortcuts

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