abstract class CRC::Base(UINT)

Extended Modules

Direct Known Subclasses

Defined in:

crc/base.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(crc : UINT = self.class.init_crc) #

Initializes the CRC instance.


[View source]

Class Method Detail

def self.checksum(data) : UINT #

Calculates the CRC checksum.


[View source]
def self.init_crc : UINT #

The default initial CRC value.


[View source]
def self.xor_mask : UINT #

The default CRC XOR mask.


[View source]

Instance Method Detail

def <<(data) #

@see #update


[View source]
def checksum : UINT #

The resulting CRC checksum.


[View source]
def digest_size : Int32 #

The size of the resulting CRC checksum.


[View source]
abstract def final_impl(dst : Bytes) : Nil #

Packs the final CRC result.


[View source]
def reset_impl : Nil #

Resets the CRC checksum.


[View source]
abstract def update_impl(data : Bytes) : Nil #

Updates the CRC checksum with the given data.


[View source]