Back to godoc.org
github.com/cxmcc/unixsums

Module github.com/cxmcc/unixsums

v0.0.0-...-8956429
Latest Go to latest

The highest tagged major version is .

Published: Nov 25, 2013 | License: MIT

Source Code

README

Unixsums is an implementation of the legacy checksum utils (cksum, sum) in Go Language.


Build Status GoDoc

Checksum functions provided

  • bsdsum (BSD checksum, sum, UNIXsum)
  • cksum (UNIX cksum, POSIX cksum)
  • sysvsum (UNIX SystemV sum, SYSV checksum, sum -s)

API Documentation

Implementing hash.Hash.
Documentation currently available at Godoc: http://godoc.org/github.com/cxmcc/unixsums

Installing

go get github.com/cxmcc/unixsums

Example

package main

import "github.com/cxmcc/unixsums/cksum"
import "fmt"
import "io"

func main() {
  h := cksum.New()
  io.WriteString(h, "Go is expressive, concise, clean, and efficient.")
  fmt.Printf("cksum: %d", h.Sum32())
  // Output: cksum: 1937373249
}

License

It’s MIT License

Source: github.com/cxmcc/unixsums@v0.0.0-20131125091133-89564297d82f/README.md