Skip to content

sigurn/crc16

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crc16

Build Status Coverage Status Go Reference

Go implementation of CRC-16 calculation for majority of widely-used polynomials.
It implements the golang hash.Hash interface.

Usage

package main

import (
	"fmt"

	"github.com/sigurn/crc16"
)

func main() {
	table := crc16.MakeTable(crc16.CRC16_MAXIM)

	crc := crc16.Checksum([]byte("Hello world!"), table)
	fmt.Printf("CRC-16 MAXIM: %X\n", crc)

	// using the standard library hash.Hash interface
	h := crc16.New(table)
	h.Write([]byte("Hello world!"))
	fmt.Printf("CRC-16 MAXIM: %X\n", h.Sum16())
}

Documentation

For more documentation see package documentation

About

Go: CRC16 package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages