sum

package
v0.0.0-...-3077202 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRC16

func CRC16(bs []byte) []byte

CRC16 计算并返回输入字节切片的CRC16校验值。

func CRC16Hex

func CRC16Hex(bs []byte) string

CRC16Hex 计算输入字节切片的CRC16校验值,并返回其十六进制字符串表示。

func MD5

func MD5(bs []byte) []byte

MD5 计算并返回输入字节切片的MD5哈希值。

func MD5Hex

func MD5Hex(bs []byte) string

MD5Hex 计算输入字节切片的MD5哈希值,并返回其十六进制字符串表示。

func SM3

func SM3(bs []byte) []byte

SM3 计算并返回输入字节切片的SM3哈希值。

func SM3Hex

func SM3Hex(bs []byte) string

SM3Hex 计算输入字节切片的SM3哈希值,并返回其十六进制字符串表示。

Types

type Hash16

type Hash16 interface {
	hash.Hash
	Sum16() uint16
}

Hash16 is an interface that extends hash.Hash with a method to return the checksum as a uint16

func NewCrc16

func NewCrc16() Hash16

NewCrc16 creates a new CRC-16 hash

Jump to

Keyboard shortcuts

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