crchelper

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 2 Imported by: 0

README

package main

import (
	"github.com/qq345340585/crchelpercrchelper"

	"github.com/astaxie/beego/logs"
)

func main() {
	m_data := []byte{0x01, 0x02, 0x03, 0x04}
	//参数对照https://crccalc.com/
	crc, _ := crchelper.CheckSum(m_data, "1021", "1D0F", "0000", false, false, 16)
	logs.Error("crc:0x%04X", crc)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSum

func CheckSum(data []byte, polystr string, initstr string, xoroutstr string, refin bool, refout bool, width uint64) (uint64, int)

func Str2DEC

func Str2DEC(s string) (num uint64)

str转十进制

Types

This section is empty.

Jump to

Keyboard shortcuts

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