https://github.com/deatil/go-crc8
crc8 相关算法 / crc8 checksum
https://github.com/deatil/go-crc8
crc crc8 go go-crc go-crc8 golang
Last synced: 7 months ago
JSON representation
crc8 相关算法 / crc8 checksum
- Host: GitHub
- URL: https://github.com/deatil/go-crc8
- Owner: deatil
- License: apache-2.0
- Created: 2022-07-12T05:10:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T04:10:34.000Z (over 1 year ago)
- Last Synced: 2025-01-10T10:29:29.046Z (9 months ago)
- Topics: crc, crc8, go, go-crc, go-crc8, golang
- Language: Go
- Homepage: https://pkg.go.dev/github.com/deatil/go-crc8
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## crc8
### 项目介绍
* crc8 相关算法
* 可用检验方法:`ChecksumCRC8`, `ChecksumCDMA2000`, `ChecksumDARC`, `ChecksumDVB_S2`, `ChecksumEBU`, `ChecksumI_CODE`, `ChecksumITU`, `ChecksumMAXIM`, `ChecksumROHC`, `ChecksumWCDMA`### 下载安装
~~~go
go get -u github.com/deatil/go-crc8
~~~### 使用
~~~go
package mainimport (
"fmt"
"encoding/hex""github.com/deatil/go-crc8/crc8"
)func main() {
// 16进制字符转为 byte
crc8Hex, _ := hex.DecodeString("010f")crc8Data := crc8.ChecksumMAXIM(crc8Hex)
crc8Data2 := crc8.ToHexString(crc8Data)fmt.Println("计算结果为:", crc8Data2)
}
~~~### 开源协议
* 本软件包遵循 `Apache2` 开源协议发布,在保留本软件包版权的情况下提供个人及商业免费使用。
### 版权
* 本软件包所属版权归 deatil(https://github.com/deatil) 所有。