Documentation ¶
Index ¶
Constants ¶
View Source
const (
CRC16_CHECKSUM_LENGTH_BYTES = 2
)
View Source
const (
CRC32_CHECKSUM_LENGTH_BYTES = 4
)
Variables ¶
View Source
var CRC32c uint32 = crc32.Castagnoli
Keeping this here for convenience, as it is not obvious to all that "CRC32c" maps to the Castagnoli algorithm.
Functions ¶
This section is empty.
Types ¶
type CRC16Adapter ¶
Supports append and strip/verify CRC16 checksums. Implements the satcom.Adapter interface.
func NewCRC16Adapter ¶
func NewCRC16Adapter(cfg CRC16AdapterConfig) (*CRC16Adapter, error)
func (*CRC16Adapter) MakeChecksum ¶
func (a *CRC16Adapter) MakeChecksum(v []byte) []byte
func (*CRC16Adapter) MessageSize ¶
func (a *CRC16Adapter) MessageSize(n int) (int, error)
type CRC16AdapterConfig ¶
type CRC32Adapter ¶
Supports append and strip/verify CRC32 checksums. Implements the satcom.Adapter interface.
func NewCRC32Adapter ¶
func NewCRC32Adapter(cfg CRC32AdapterConfig) (*CRC32Adapter, error)
func (*CRC32Adapter) MessageSize ¶
func (a *CRC32Adapter) MessageSize(n int) (int, error)
type CRC32AdapterConfig ¶
type CRC32AdapterConfig struct {
Algorithm uint32
}
Click to show internal directories.
Click to hide internal directories.