Documentation
¶
Index ¶
Constants ¶
View Source
const BankSize = 2048
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRC16 ¶
type CRC16 struct {
Poly uint16
// contains filtered or unexported fields
}
CRC16 does the ieee crc16 polynomial check
func NewCCITTCRC16 ¶
func NewCCITTCRC16() *CRC16
func NewIBMCRC16 ¶
func NewIBMCRC16() *CRC16
func NewSCSICRC16 ¶
func NewSCSICRC16() *CRC16
type CRC32 ¶
type CRC32 struct {
Poly uint32
// contains filtered or unexported fields
}
CRC32 does the ieee crc32 polynomial check
func NewCastagnoliCRC32 ¶
func NewCastagnoliCRC32() *CRC32
func NewIEEECRC32 ¶
func NewIEEECRC32() *CRC32
func NewKoopmanCRC32 ¶
func NewKoopmanCRC32() *CRC32
type CRC64 ¶
type CRC64 struct {
Poly uint64
// contains filtered or unexported fields
}
CRC64 does the ieee crc64 polynomial check
func NewECMACRC64 ¶
func NewECMACRC64() *CRC64
func NewISOCRC64 ¶
func NewISOCRC64() *CRC64
type ECC ¶
type ECC interface {
// AddECC calculates an error-correcting code for the input
// returns an output with the code appended
AddECC([]byte) []byte
// CheckECC verifies if the ECC is proper on the input and returns
// the data with the code removed, or an error
CheckECC([]byte) ([]byte, error)
}
ECC is used for anything that calculates an error-correcting code
type WordCodec ¶
type WordCodec struct {
// contains filtered or unexported fields
}
func MustLoadCodec ¶
MustLoadCodec panics if word bank is missing, only for tests
func (*WordCodec) BytesToWords ¶
TODO: add checksum
Click to show internal directories.
Click to hide internal directories.