diff --git a/api/crc16/index.html b/api/crc16/index.html index d50a64f..55df2b4 100644 --- a/api/crc16/index.html +++ b/api/crc16/index.html @@ -470,6 +470,51 @@ + + +
  • + + + IBM + + + +
  • + +
  • + + + MAXIM + + + +
  • + +
  • + + + USB + + + +
  • + +
  • + + + X25 + + + +
  • + +
  • + + + DNP + + +
  • @@ -1134,6 +1179,51 @@ + + +
  • + + + IBM + + + +
  • + +
  • + + + MAXIM + + + +
  • + +
  • + + + USB + + + +
  • + +
  • + + + X25 + + + +
  • + +
  • + + + DNP + + +
  • @@ -1219,6 +1309,106 @@

    +
    + + + +

    + IBM = Configuration(width=16, polynomial=32773, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + +
    + + + +

    + MAXIM = Configuration(width=16, polynomial=32773, init_value=0, final_xor_value=65535, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + +
    + + + +

    + USB = Configuration(width=16, polynomial=32773, init_value=65535, final_xor_value=65535, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + +
    + + + +

    + X25 = Configuration(width=16, polynomial=4129, init_value=65535, final_xor_value=65535, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + +
    + + + +

    + DNP = Configuration(width=16, polynomial=15717, init_value=0, final_xor_value=65535, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + diff --git a/api/crc8/index.html b/api/crc8/index.html index eb1c0db..25de740 100644 --- a/api/crc8/index.html +++ b/api/crc8/index.html @@ -476,6 +476,24 @@ + + +
  • + + + ITU + + + +
  • + +
  • + + + ROHC + + +
  • @@ -1188,6 +1206,24 @@ + + +
  • + + + ITU + + + +
  • + +
  • + + + ROHC + + +
  • @@ -1333,6 +1369,46 @@

    +
    + + + +

    + ITU = Configuration(width=8, polynomial=7, init_value=0, final_xor_value=85, reverse_input=False, reverse_output=False) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + +
    + + + +

    + ROHC = Configuration(width=8, polynomial=7, init_value=255, final_xor_value=0, reverse_input=True, reverse_output=True) + + + class-attribute + instance-attribute + + +

    + + +
    +
    + +
    + diff --git a/changelog/unreleased/index.html b/changelog/unreleased/index.html index 00af5f2..1fc8a9d 100644 --- a/changelog/unreleased/index.html +++ b/changelog/unreleased/index.html @@ -729,6 +729,15 @@ diff --git a/objects.inv b/objects.inv index c6da745..cbc6437 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/search/search_index.json b/search/search_index.json index 421205a..2a93a08 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"CRC

    Calculate CRC checksums, verify CRC checksum, predefined CRC configurations, custom CRC configurations

    "},{"location":"#available-crc-configurations","title":"Available CRC Configurations","text":"

    The library includes a variety of common CRC configurations for convenience. To explore the full range of available CRC configurations, please checkout the configurations section of the documentation. If you need a new configuration to be readily available, consider submitting a PR or raising an issue.

    "},{"location":"#custom-configurations","title":"Custom Configurations","text":"

    If you want to create a custom configuration, you should have the following information available:

    In case you only have a name of a specific crc configuration/algorithm and you are unsure what are the specific parameters of it, a look into this crc-catalogue might help.

    Note

    This library currently only supports bit widths of full bytes 8, 16, 24, 32, ...

    "},{"location":"#requirements","title":"Requirements","text":""},{"location":"#installation","title":"Installation","text":"
    pip install crc\n
    "},{"location":"#examples","title":"Examples","text":""},{"location":"#create-a-calculator","title":"Create a Calculator","text":"Pre defined configurationCustom configuration
    from crc import Calculator, Crc8\n\ncalculator = Calculator(Crc8.CCITT)\n
    from crc import Calculator, Configuration\n\nconfig = Configuration(\n    width=8,\n    poly=0x07,\n    init_value=0x00,\n    final_xor_value=0x00,\n    reverse_input=False,\n    reverse_output=False,\n)\n\ncalculator = Calculator(config)\n
    "},{"location":"#calculate-a-checksum","title":"Calculate a checksum","text":"StandardOptimized for speed
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT)\n\nassert expected == calculator.checksum(data)\n
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert expected == calculator.checksum(data)\n
    "},{"location":"#verify-a-checksum","title":"Verify a checksum","text":"StandardOptimized for speed
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT)\n\nassert calculator.verify(data, expected)\n
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.verify(data, expected)\n
    "},{"location":"#supported-data-types","title":"Supported data types","text":"intbytesbytearrayFileByteIoIterable of bytesByte convertibles
    from crc import Calculator, Crc8\n\nexpected = 0x20\ndata = 97\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = b\"123456789\"\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = bytearray(b\"123456789\")\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nwith open(\"afile.txt\", \"rb\") as f:\n    assert calculator.checksum(f) == expected\n
    import io\n\nfrom crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = io.ByteIo(b\"123456789\")\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\ndata = (data for data in [b\"12\", b\"34\", b\"56\", b\"78\", b\"9\"])\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\n\nclass ByteConvertible:\n    def __init__(self, data):\n        self._data = data\n\n    def __bytes__(self):\n        return self._data.encode(\"utf-8\")\n\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\ndata = ByteConvertible(\"123456789\")\n\nassert calculator.checksum(bytes(data)) == expected\n
    "},{"location":"#calculate-a-checksum-with-raw-registers","title":"Calculate a checksum with raw registers","text":"RegisterTableBasedRegister
    from crc import Crc8, Register\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\nregister = Register(Crc8.CCITT)\n\nregister.init()\nregister.update(data)\nassert expected == register.digest()\n
    from crc import Crc8, TableBasedRegister\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\nregister = TableBasedRegister(Crc8.CCITT)\n\nregister.init()\nregister.update(data)\nassert expected == register.digest()\n
    "},{"location":"#references-resources","title":"References & Resources","text":""},{"location":"cli/","title":"CLI Tools","text":"

    The crc library comes with a small command line tool which can generate crc lookup tables if needed.

    usage: crc table [-h] <width> <polynomial>\n\npositional arguments:\n  <width>       width of the crc algorithm, common width's are 8, 16, 32, 64\n  <polynomial>  hex value of the polynomial used for calculating the crc table\n\noptional arguments:\n  -h, --help    show this help message and exit\n

    Example Usage:

    user@host ~$ crc table 8 0x7D\n
    "},{"location":"configurations/","title":"Configurations","text":""},{"location":"configurations/#crc8","title":"Crc8","text":"CCITTSAEJ1850SAEJ1850_ZEROAUTOSARBLUETOOTHMAXIM_DOW "},{"location":"configurations/#crc16","title":"Crc16","text":"XMODEMGSMPROFIBUSMODBUSIBM_3740KERMIT "},{"location":"configurations/#crc32","title":"Crc32","text":"CRC32AUTOSARBZIP2POSIX "},{"location":"configurations/#crc64","title":"Crc64","text":"CRC64 "},{"location":"contributors/","title":"Contributors","text":"

    Thank you to all contributors for your help in improving this project. \ud83d\ude80

    "},{"location":"api/abstract_register/","title":"AbstractRegister","text":"

    Abstract base class / Interface a crc register needs to implement.

    Workflow
    1. The Crc-Register needs to be initialized. 1 time (init)
    2. Data is feed into the crc register. 1..n times (update)
    3. Final result is calculated. 1 time (digest)
    "},{"location":"api/abstract_register/#crc.AbstractRegister.digest","title":"digest() abstractmethod","text":"

    Final crc checksum will be calculated.

    Returns:

    Type Description int

    Final crc result/value (applies pending operations like final xor).

    "},{"location":"api/abstract_register/#crc.AbstractRegister.init","title":"init() abstractmethod","text":"

    Initializes the crc register.

    "},{"location":"api/abstract_register/#crc.AbstractRegister.reverse","title":"reverse() abstractmethod","text":"

    Calculates the reversed value of the crc register.

    Returns:

    Type Description int

    The reversed value of the crc register.

    "},{"location":"api/abstract_register/#crc.AbstractRegister.update","title":"update(data) abstractmethod","text":"

    Feeds data into the register.

    Parameters:

    Name Type Description Default data bytes

    which will be feed into the register.

    required

    Returns:

    Type Description int

    Register content after the update.

    "},{"location":"api/basic_register/","title":"BasicRegister","text":"

    Bases: AbstractRegister

    Implements the common crc algorithm, assuming a user of this base class will provide an overwrite for the _process_byte method.

    "},{"location":"api/basic_register/#crc.BasicRegister.__getitem__","title":"__getitem__(index)","text":"

    Gets a single byte of the register.

    Parameters:

    Name Type Description Default index int

    byte which shall be returned.

    required

    Returns:

    Type Description int

    The byte at the specified index.

    Raises:

    Type Description IndexError

    Invalid index for this register.

    "},{"location":"api/basic_register/#crc.BasicRegister.__init__","title":"__init__(configuration)","text":"

    Create a new BasicRegister.

    Parameters:

    Name Type Description Default configuration Configuration

    Used to configure the crc algorithm.

    required"},{"location":"api/basic_register/#crc.BasicRegister.__len__","title":"__len__()","text":"

    Returns:

    Type Description int

    The width of the register.

    "},{"location":"api/basic_register/#crc.BasicRegister.digest","title":"digest()","text":"

    See AbstractRegister.digest

    "},{"location":"api/basic_register/#crc.BasicRegister.init","title":"init()","text":"

    See AbstractRegister.init

    "},{"location":"api/basic_register/#crc.BasicRegister.reverse","title":"reverse()","text":"

    See AbstractRegister.digest

    "},{"location":"api/basic_register/#crc.BasicRegister.update","title":"update(data)","text":"

    See AbstractRegister.update

    "},{"location":"api/calculator/","title":"Calculator","text":""},{"location":"api/calculator/#crc.InputType","title":"InputType = Union[int, bytes, bytearray, memoryview, BinaryIO, Iterable[Union[bytes, bytearray, memoryview]]] module-attribute","text":"

    Type alias for acceptable input types for Calculator.

    "},{"location":"api/calculator/#crc.Calculator.__init__","title":"__init__(configuration, optimized=False)","text":"

    Creates a new Calculator.

    Parameters:

    Name Type Description Default configuration Configuration

    for the crc algorithm.

    required optimized bool

    whether a register optimized for speed shall be used.

    False

    initializing an optimized calculator might take some extra time, calculation itself will be faster though.

    "},{"location":"api/calculator/#crc.Calculator.checksum","title":"checksum(data)","text":"

    Calculates the checksum for the given data.

    Parameters:

    Name Type Description Default data InputType

    which will be used as input for the checksum.

    required

    Returns:

    Type Description int

    Checksum for the given input data.

    "},{"location":"api/calculator/#crc.Calculator.verify","title":"verify(data, expected)","text":"

    Verifies that the checksum for the given data is the expected one.

    Parameters:

    Name Type Description Default data InputType

    which will be used as input for the checksum.

    required expected int

    checksum.

    required

    Returns:

    Type Description bool

    True if the expected checksum matches the actual checksum for the given data, False otherwise.

    "},{"location":"api/configuration/","title":"Configuration","text":"

    A Configuration provides all settings necessary to determine the concrete implementation of a specific crc algorithm/register.

    Example

    Create a custom configuration

    from crc import Configuration\n\nsaej1850 = Configuration(\n    width=8,\n    polynomial=0x1D,\n    init_value=0xFF,\n    final_xor_value=0xFF,\n    reverse_input=False,\n    reverse_output=False\n)\n
    "},{"location":"api/configuration/#crc.Configuration.width","title":"width: int instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.polynomial","title":"polynomial: int instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.init_value","title":"init_value: int = 0 class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.final_xor_value","title":"final_xor_value: int = 0 class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.reverse_input","title":"reverse_input: bool = False class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.reverse_output","title":"reverse_output: bool = False class-attribute instance-attribute","text":""},{"location":"api/crc16/","title":"Crc16","text":""},{"location":"api/crc16/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc16/#crc.Crc16.GSM","title":"GSM = Configuration(width=16, polynomial=4129, init_value=0, final_xor_value=65535, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.PROFIBUS","title":"PROFIBUS = Configuration(width=16, polynomial=7631, init_value=65535, final_xor_value=65535, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc32/","title":"Crc32","text":""},{"location":"api/crc32/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc32/#crc.Crc32.CRC32","title":"CRC32 = Configuration(width=32, polynomial=79764919, init_value=4294967295, final_xor_value=4294967295, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.AUTOSAR","title":"AUTOSAR = Configuration(width=32, polynomial=4104977171, init_value=4294967295, final_xor_value=4294967295, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.BZIP2","title":"BZIP2 = Configuration(width=32, polynomial=79764919, init_value=4294967295, final_xor_value=4294967295, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.POSIX","title":"POSIX = Configuration(width=32, polynomial=79764919, init_value=0, final_xor_value=4294967295, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc64/","title":"Crc64","text":""},{"location":"api/crc64/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc64/#crc.Crc64.CRC64","title":"CRC64 = Configuration(width=64, polynomial=4823603603198064275, init_value=0, final_xor_value=0, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/","title":"Crc8","text":""},{"location":"api/crc8/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc8/#crc.Crc8.CCITT","title":"CCITT = Configuration(width=8, polynomial=7, init_value=0, final_xor_value=0, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.AUTOSAR","title":"AUTOSAR = Configuration(width=8, polynomial=47, init_value=255, final_xor_value=255, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.BLUETOOTH","title":"BLUETOOTH = Configuration(width=8, polynomial=167, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.SAEJ1850","title":"SAEJ1850 = Configuration(width=8, polynomial=29, init_value=255, final_xor_value=255, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.MAXIM_DOW","title":"MAXIM_DOW = Configuration(width=8, polynomial=49, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/register/","title":"Register","text":"

    Bases: BasicRegister

    Simple crc register, which will process one bit at the time.

    Note

    If performance is an important issue for the crc calculation use a table based register.

    "},{"location":"api/table_based_register/","title":"TableBasedRegister","text":"

    Bases: BasicRegister

    Lookup table based crc register.

    Info

    This register type will be much faster than a simple bit by bit based crc register like Register.

    "},{"location":"api/table_based_register/#crc.TableBasedRegister.__init__","title":"__init__(configuration)","text":"

    Creates a new table based crc register.

    Parameters:

    Name Type Description Default configuration Configuration

    used for the crc algorithm.

    required Attention

    Creating a table based register initially might take some extra time, due to the fact that some lookup tables need to be calculated/initialized.

    "},{"location":"changelog/changes_2.0.0/","title":"2.0.0 - 2022-11-27","text":""},{"location":"changelog/changes_2.0.0/#breaking-api-changes","title":"\ud83d\udea8 Breaking API Changes","text":"

    ** Renamed **

    Classes:

    Functions & Methods:

    Arguments:

    ** Removed **

    "},{"location":"changelog/changes_2.0.0/#removed","title":"\ud83d\uddd1 Removed","text":""},{"location":"changelog/changes_2.0.0/#added","title":"\u2728 Added","text":""},{"location":"changelog/changes_2.0.0/#refactorings","title":"\ud83d\udd27 Refactorings","text":""},{"location":"changelog/changes_3.0.0/","title":"3.0.0 - 2022-12-04","text":""},{"location":"changelog/changes_3.0.0/#breaking-api-changes","title":"\ud83d\udea8 Breaking API Changes","text":"

    ** Renamed **

    Functions & Methods:

    "},{"location":"changelog/changes_3.0.0/#fixes","title":"\ud83d\udc1b Fixes","text":""},{"location":"changelog/changes_3.0.0/#added","title":"\u2728 Added","text":"

    (int, ByteString, BinaryIO, Iterable[ByteString])

    "},{"location":"changelog/changes_3.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_3.0.1/","title":"3.0.1 - 2022-12-18","text":""},{"location":"changelog/changes_3.0.1/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_3.0.1/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.0.0/","title":"4.0.0 - 2022-12-18","text":""},{"location":"changelog/changes_4.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_4.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.0.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.1.0/","title":"4.1.0 - 2022-12-18","text":""},{"location":"changelog/changes_4.1.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.1.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.2.0/","title":"4.2.0 - 2023-04-16","text":""},{"location":"changelog/changes_4.2.0/#features","title":"\u2728 Features","text":""},{"location":"changelog/changes_4.2.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.2.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.3.0/","title":"4.3.0 - 2023-06-25","text":""},{"location":"changelog/changes_4.3.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.3.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_5.0.0/","title":"5.0.0 - 2023-10-08","text":"

    \ud83d\ude80 This release is powered by Gert van Dijk, thank you for your contribution!

    "},{"location":"changelog/changes_5.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_5.0.0/#added","title":"\u2728 Added","text":""},{"location":"changelog/changes_5.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_5.0.0/#internal-development","title":"\ud83d\udd29 Internal / Development","text":""},{"location":"changelog/changes_6.0.0/","title":"6.0.0 - 2023-12-02","text":""},{"location":"changelog/changes_6.0.0/#breaking-changes","title":"\ud83d\udea8\ufe0f Breaking Changes","text":""},{"location":"changelog/changes_6.0.0/#bug-fix","title":"\ud83d\udc1e Bug Fix","text":""},{"location":"changelog/changes_6.0.0/#internal-development","title":"\ud83d\udd29 Internal / Development","text":""},{"location":"changelog/changes_6.1.0/","title":"6.1.0 - 2023-12-30","text":"

    \ud83d\ude80 This release is powered by Riccardo Malavolti, thank you for your contribution!

    "},{"location":"changelog/changes_6.1.0/#features","title":"\u2728 Features","text":""},{"location":"changelog/changes_6.1.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_6.1.1/","title":"6.1.1 - 2024-02-10","text":"

    \ud83d\ude80 This release is powered by Ramya-Ab, thank you for your contribution!

    "},{"location":"changelog/changes_6.1.1/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_6.1.1/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_6.1.2/","title":"6.1.2 - 2024-04-14","text":""},{"location":"changelog/changes_6.1.2/#bug-fixes","title":"\ud83d\udc1e Bug Fixes","text":""},{"location":"changelog/changes_6.1.2/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_6.1.2/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_7.0.0/","title":"7.0.0 - 2024-04-19","text":""},{"location":"changelog/changes_7.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_7.0.0/#update-of-crc-configurations","title":"Update of crc configurations","text":""},{"location":"changelog/changes_7.0.0/#decision-rationale","title":"Decision Rationale","text":"

    It was intentionally decided not to reintroduce Crc16.CCITT with the updated configuration. While it could have been added as an alias for Crc16.KERMIT or a replacement, omitting Crc16.CCITT ensures that client code will break upon update, thereby forcing maintainers to take notice and react accordingly.

    "},{"location":"changelog/changes_7.0.0/#migration-guide","title":"Migration Guide","text":"

    Below are solutions to the two common scenarios that need to be addressed due to this change:

    1. If you previously used Crc16.CCITT and expected the configuration defined here:

      Solution: Replace all usages of Crc16.CCITT in your code with Crc16.KERMIT.

    2. If you depended on or wanted to use the configuration values that Crc16.CCITT provided so far:

      Solution: Replace all usages of Crc16.CCITT in your code with Crc16.XMODEM.

    "},{"location":"changelog/changes_7.0.0/#related-issues","title":"Related Issues","text":""},{"location":"changelog/changes_7.0.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/unreleased/","title":"Unreleased","text":""},{"location":"changelog/unreleased/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"development/release/","title":"Release","text":""},{"location":"development/release/#create-a-release-using-the-github-release-workflow","title":"Create a release using the GitHub release workflow","text":"
    1. Rename unreleased.md to changes_{X.Y.Z}.md
    2. Update heading in changes_{X.Y.Z}.md to reflect the release version
    3. Add the current date behind the release number
      # X.Y.Z - YYYY-MM-DD\n
    4. Prepare the release
      invoke release.prepare X.Y.Z\n
    5. Run the CI/CD pipeline to publish the release: Execute the release.workflow task and follow potential instructions.
      invoke release.workflow X.Y.Z\n
    "},{"location":"development/setup/","title":"Setup","text":""},{"location":"development/setup/#requirements-tldr","title":"Requirements TL;DR","text":""},{"location":"development/setup/#1-install-poetry","title":"1. Install Poetry","text":"

    Follow the poetry installation instructions.

    "},{"location":"development/setup/#2-install-gh","title":"2. Install gh","text":"

    Follow the gh installation instructions.

    "},{"location":"development/setup/#3-checkout-the-project","title":"3. Checkout the project","text":"GitHub CLISSHHTTPS
    gh repo clone Nicoretti/crc\n
    git clone git@github.com:Nicoretti/crc.git\n
    git clone https://github.com/Nicoretti/crc.git\n
    "},{"location":"development/setup/#4-switch-into-the-directory","title":"4. Switch into the directory","text":"
    cd crc\n
    "},{"location":"development/setup/#5-the-poetry-environment","title":"5. The Poetry environment","text":"

    Make sure the poetry environment is setup properly and all dependencies are installed.

    1. Activate the Poetry shell

      poetry shell\n
    2. Install the project dependencies

      poetry install\n
    "},{"location":"development/setup/#run-the-init-task","title":"Run the init task","text":"

    In order to bootstrap the remaining parts of the workspace setup, just execute the following command:

    invoke init\n

    Note

    Follow potential instructions.

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":"CRC

    Calculate CRC checksums, verify CRC checksum, predefined CRC configurations, custom CRC configurations

    "},{"location":"#available-crc-configurations","title":"Available CRC Configurations","text":"

    The library includes a variety of common CRC configurations for convenience. To explore the full range of available CRC configurations, please checkout the configurations section of the documentation. If you need a new configuration to be readily available, consider submitting a PR or raising an issue.

    "},{"location":"#custom-configurations","title":"Custom Configurations","text":"

    If you want to create a custom configuration, you should have the following information available:

    In case you only have a name of a specific crc configuration/algorithm and you are unsure what are the specific parameters of it, a look into this crc-catalogue might help.

    Note

    This library currently only supports bit widths of full bytes 8, 16, 24, 32, ...

    "},{"location":"#requirements","title":"Requirements","text":""},{"location":"#installation","title":"Installation","text":"
    pip install crc\n
    "},{"location":"#examples","title":"Examples","text":""},{"location":"#create-a-calculator","title":"Create a Calculator","text":"Pre defined configurationCustom configuration
    from crc import Calculator, Crc8\n\ncalculator = Calculator(Crc8.CCITT)\n
    from crc import Calculator, Configuration\n\nconfig = Configuration(\n    width=8,\n    poly=0x07,\n    init_value=0x00,\n    final_xor_value=0x00,\n    reverse_input=False,\n    reverse_output=False,\n)\n\ncalculator = Calculator(config)\n
    "},{"location":"#calculate-a-checksum","title":"Calculate a checksum","text":"StandardOptimized for speed
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT)\n\nassert expected == calculator.checksum(data)\n
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert expected == calculator.checksum(data)\n
    "},{"location":"#verify-a-checksum","title":"Verify a checksum","text":"StandardOptimized for speed
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT)\n\nassert calculator.verify(data, expected)\n
    from crc import Calculator, Crc8\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.verify(data, expected)\n
    "},{"location":"#supported-data-types","title":"Supported data types","text":"intbytesbytearrayFileByteIoIterable of bytesByte convertibles
    from crc import Calculator, Crc8\n\nexpected = 0x20\ndata = 97\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = b\"123456789\"\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = bytearray(b\"123456789\")\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nwith open(\"afile.txt\", \"rb\") as f:\n    assert calculator.checksum(f) == expected\n
    import io\n\nfrom crc import Calculator, Crc8\n\nexpected = 0xF4\ndata = io.ByteIo(b\"123456789\")\ncalculator = Calculator(Crc8.CCITT, optimized=True)\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\ndata = (data for data in [b\"12\", b\"34\", b\"56\", b\"78\", b\"9\"])\n\nassert calculator.checksum(data) == expected\n
    from crc import Calculator, Crc8\n\n\nclass ByteConvertible:\n    def __init__(self, data):\n        self._data = data\n\n    def __bytes__(self):\n        return self._data.encode(\"utf-8\")\n\n\nexpected = 0xF4\ncalculator = Calculator(Crc8.CCITT, optimized=True)\ndata = ByteConvertible(\"123456789\")\n\nassert calculator.checksum(bytes(data)) == expected\n
    "},{"location":"#calculate-a-checksum-with-raw-registers","title":"Calculate a checksum with raw registers","text":"RegisterTableBasedRegister
    from crc import Crc8, Register\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\nregister = Register(Crc8.CCITT)\n\nregister.init()\nregister.update(data)\nassert expected == register.digest()\n
    from crc import Crc8, TableBasedRegister\n\nexpected = 0xBC\ndata = bytes([0, 1, 2, 3, 4, 5])\nregister = TableBasedRegister(Crc8.CCITT)\n\nregister.init()\nregister.update(data)\nassert expected == register.digest()\n
    "},{"location":"#references-resources","title":"References & Resources","text":""},{"location":"cli/","title":"CLI Tools","text":"

    The crc library comes with a small command line tool which can generate crc lookup tables if needed.

    usage: crc table [-h] <width> <polynomial>\n\npositional arguments:\n  <width>       width of the crc algorithm, common width's are 8, 16, 32, 64\n  <polynomial>  hex value of the polynomial used for calculating the crc table\n\noptional arguments:\n  -h, --help    show this help message and exit\n

    Example Usage:

    user@host ~$ crc table 8 0x7D\n
    "},{"location":"configurations/","title":"Configurations","text":""},{"location":"configurations/#crc8","title":"Crc8","text":"CCITTSAEJ1850SAEJ1850_ZEROAUTOSARBLUETOOTHMAXIM_DOWITUROHC "},{"location":"configurations/#crc16","title":"Crc16","text":"XMODEMGSMPROFIBUSMODBUSIBM_3740KERMITIBMMAXIMUSBX25DNP "},{"location":"configurations/#crc32","title":"Crc32","text":"CRC32AUTOSARBZIP2POSIX "},{"location":"configurations/#crc64","title":"Crc64","text":"CRC64 "},{"location":"contributors/","title":"Contributors","text":"

    Thank you to all contributors for your help in improving this project. \ud83d\ude80

    "},{"location":"api/abstract_register/","title":"AbstractRegister","text":"

    Abstract base class / Interface a crc register needs to implement.

    Workflow
    1. The Crc-Register needs to be initialized. 1 time (init)
    2. Data is feed into the crc register. 1..n times (update)
    3. Final result is calculated. 1 time (digest)
    "},{"location":"api/abstract_register/#crc.AbstractRegister.digest","title":"digest() abstractmethod","text":"

    Final crc checksum will be calculated.

    Returns:

    Type Description int

    Final crc result/value (applies pending operations like final xor).

    "},{"location":"api/abstract_register/#crc.AbstractRegister.init","title":"init() abstractmethod","text":"

    Initializes the crc register.

    "},{"location":"api/abstract_register/#crc.AbstractRegister.reverse","title":"reverse() abstractmethod","text":"

    Calculates the reversed value of the crc register.

    Returns:

    Type Description int

    The reversed value of the crc register.

    "},{"location":"api/abstract_register/#crc.AbstractRegister.update","title":"update(data) abstractmethod","text":"

    Feeds data into the register.

    Parameters:

    Name Type Description Default data bytes

    which will be feed into the register.

    required

    Returns:

    Type Description int

    Register content after the update.

    "},{"location":"api/basic_register/","title":"BasicRegister","text":"

    Bases: AbstractRegister

    Implements the common crc algorithm, assuming a user of this base class will provide an overwrite for the _process_byte method.

    "},{"location":"api/basic_register/#crc.BasicRegister.__getitem__","title":"__getitem__(index)","text":"

    Gets a single byte of the register.

    Parameters:

    Name Type Description Default index int

    byte which shall be returned.

    required

    Returns:

    Type Description int

    The byte at the specified index.

    Raises:

    Type Description IndexError

    Invalid index for this register.

    "},{"location":"api/basic_register/#crc.BasicRegister.__init__","title":"__init__(configuration)","text":"

    Create a new BasicRegister.

    Parameters:

    Name Type Description Default configuration Configuration

    Used to configure the crc algorithm.

    required"},{"location":"api/basic_register/#crc.BasicRegister.__len__","title":"__len__()","text":"

    Returns:

    Type Description int

    The width of the register.

    "},{"location":"api/basic_register/#crc.BasicRegister.digest","title":"digest()","text":"

    See AbstractRegister.digest

    "},{"location":"api/basic_register/#crc.BasicRegister.init","title":"init()","text":"

    See AbstractRegister.init

    "},{"location":"api/basic_register/#crc.BasicRegister.reverse","title":"reverse()","text":"

    See AbstractRegister.digest

    "},{"location":"api/basic_register/#crc.BasicRegister.update","title":"update(data)","text":"

    See AbstractRegister.update

    "},{"location":"api/calculator/","title":"Calculator","text":""},{"location":"api/calculator/#crc.InputType","title":"InputType = Union[int, bytes, bytearray, memoryview, BinaryIO, Iterable[Union[bytes, bytearray, memoryview]]] module-attribute","text":"

    Type alias for acceptable input types for Calculator.

    "},{"location":"api/calculator/#crc.Calculator.__init__","title":"__init__(configuration, optimized=False)","text":"

    Creates a new Calculator.

    Parameters:

    Name Type Description Default configuration Configuration

    for the crc algorithm.

    required optimized bool

    whether a register optimized for speed shall be used.

    False

    initializing an optimized calculator might take some extra time, calculation itself will be faster though.

    "},{"location":"api/calculator/#crc.Calculator.checksum","title":"checksum(data)","text":"

    Calculates the checksum for the given data.

    Parameters:

    Name Type Description Default data InputType

    which will be used as input for the checksum.

    required

    Returns:

    Type Description int

    Checksum for the given input data.

    "},{"location":"api/calculator/#crc.Calculator.verify","title":"verify(data, expected)","text":"

    Verifies that the checksum for the given data is the expected one.

    Parameters:

    Name Type Description Default data InputType

    which will be used as input for the checksum.

    required expected int

    checksum.

    required

    Returns:

    Type Description bool

    True if the expected checksum matches the actual checksum for the given data, False otherwise.

    "},{"location":"api/configuration/","title":"Configuration","text":"

    A Configuration provides all settings necessary to determine the concrete implementation of a specific crc algorithm/register.

    Example

    Create a custom configuration

    from crc import Configuration\n\nsaej1850 = Configuration(\n    width=8,\n    polynomial=0x1D,\n    init_value=0xFF,\n    final_xor_value=0xFF,\n    reverse_input=False,\n    reverse_output=False\n)\n
    "},{"location":"api/configuration/#crc.Configuration.width","title":"width: int instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.polynomial","title":"polynomial: int instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.init_value","title":"init_value: int = 0 class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.final_xor_value","title":"final_xor_value: int = 0 class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.reverse_input","title":"reverse_input: bool = False class-attribute instance-attribute","text":""},{"location":"api/configuration/#crc.Configuration.reverse_output","title":"reverse_output: bool = False class-attribute instance-attribute","text":""},{"location":"api/crc16/","title":"Crc16","text":""},{"location":"api/crc16/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc16/#crc.Crc16.GSM","title":"GSM = Configuration(width=16, polynomial=4129, init_value=0, final_xor_value=65535, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.PROFIBUS","title":"PROFIBUS = Configuration(width=16, polynomial=7631, init_value=65535, final_xor_value=65535, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.IBM","title":"IBM = Configuration(width=16, polynomial=32773, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.MAXIM","title":"MAXIM = Configuration(width=16, polynomial=32773, init_value=0, final_xor_value=65535, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.USB","title":"USB = Configuration(width=16, polynomial=32773, init_value=65535, final_xor_value=65535, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.X25","title":"X25 = Configuration(width=16, polynomial=4129, init_value=65535, final_xor_value=65535, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc16/#crc.Crc16.DNP","title":"DNP = Configuration(width=16, polynomial=15717, init_value=0, final_xor_value=65535, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc32/","title":"Crc32","text":""},{"location":"api/crc32/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc32/#crc.Crc32.CRC32","title":"CRC32 = Configuration(width=32, polynomial=79764919, init_value=4294967295, final_xor_value=4294967295, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.AUTOSAR","title":"AUTOSAR = Configuration(width=32, polynomial=4104977171, init_value=4294967295, final_xor_value=4294967295, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.BZIP2","title":"BZIP2 = Configuration(width=32, polynomial=79764919, init_value=4294967295, final_xor_value=4294967295, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc32/#crc.Crc32.POSIX","title":"POSIX = Configuration(width=32, polynomial=79764919, init_value=0, final_xor_value=4294967295, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc64/","title":"Crc64","text":""},{"location":"api/crc64/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc64/#crc.Crc64.CRC64","title":"CRC64 = Configuration(width=64, polynomial=4823603603198064275, init_value=0, final_xor_value=0, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/","title":"Crc8","text":""},{"location":"api/crc8/#available-configurations","title":"Available Configurations","text":"

    Bases: Enum

    "},{"location":"api/crc8/#crc.Crc8.CCITT","title":"CCITT = Configuration(width=8, polynomial=7, init_value=0, final_xor_value=0, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.AUTOSAR","title":"AUTOSAR = Configuration(width=8, polynomial=47, init_value=255, final_xor_value=255, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.BLUETOOTH","title":"BLUETOOTH = Configuration(width=8, polynomial=167, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.SAEJ1850","title":"SAEJ1850 = Configuration(width=8, polynomial=29, init_value=255, final_xor_value=255, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.MAXIM_DOW","title":"MAXIM_DOW = Configuration(width=8, polynomial=49, init_value=0, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.ITU","title":"ITU = Configuration(width=8, polynomial=7, init_value=0, final_xor_value=85, reverse_input=False, reverse_output=False) class-attribute instance-attribute","text":""},{"location":"api/crc8/#crc.Crc8.ROHC","title":"ROHC = Configuration(width=8, polynomial=7, init_value=255, final_xor_value=0, reverse_input=True, reverse_output=True) class-attribute instance-attribute","text":""},{"location":"api/register/","title":"Register","text":"

    Bases: BasicRegister

    Simple crc register, which will process one bit at the time.

    Note

    If performance is an important issue for the crc calculation use a table based register.

    "},{"location":"api/table_based_register/","title":"TableBasedRegister","text":"

    Bases: BasicRegister

    Lookup table based crc register.

    Info

    This register type will be much faster than a simple bit by bit based crc register like Register.

    "},{"location":"api/table_based_register/#crc.TableBasedRegister.__init__","title":"__init__(configuration)","text":"

    Creates a new table based crc register.

    Parameters:

    Name Type Description Default configuration Configuration

    used for the crc algorithm.

    required Attention

    Creating a table based register initially might take some extra time, due to the fact that some lookup tables need to be calculated/initialized.

    "},{"location":"changelog/changes_2.0.0/","title":"2.0.0 - 2022-11-27","text":""},{"location":"changelog/changes_2.0.0/#breaking-api-changes","title":"\ud83d\udea8 Breaking API Changes","text":"

    ** Renamed **

    Classes:

    Functions & Methods:

    Arguments:

    ** Removed **

    "},{"location":"changelog/changes_2.0.0/#removed","title":"\ud83d\uddd1 Removed","text":""},{"location":"changelog/changes_2.0.0/#added","title":"\u2728 Added","text":""},{"location":"changelog/changes_2.0.0/#refactorings","title":"\ud83d\udd27 Refactorings","text":""},{"location":"changelog/changes_3.0.0/","title":"3.0.0 - 2022-12-04","text":""},{"location":"changelog/changes_3.0.0/#breaking-api-changes","title":"\ud83d\udea8 Breaking API Changes","text":"

    ** Renamed **

    Functions & Methods:

    "},{"location":"changelog/changes_3.0.0/#fixes","title":"\ud83d\udc1b Fixes","text":""},{"location":"changelog/changes_3.0.0/#added","title":"\u2728 Added","text":"

    (int, ByteString, BinaryIO, Iterable[ByteString])

    "},{"location":"changelog/changes_3.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_3.0.1/","title":"3.0.1 - 2022-12-18","text":""},{"location":"changelog/changes_3.0.1/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_3.0.1/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.0.0/","title":"4.0.0 - 2022-12-18","text":""},{"location":"changelog/changes_4.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_4.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.0.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.1.0/","title":"4.1.0 - 2022-12-18","text":""},{"location":"changelog/changes_4.1.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.1.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.2.0/","title":"4.2.0 - 2023-04-16","text":""},{"location":"changelog/changes_4.2.0/#features","title":"\u2728 Features","text":""},{"location":"changelog/changes_4.2.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.2.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_4.3.0/","title":"4.3.0 - 2023-06-25","text":""},{"location":"changelog/changes_4.3.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_4.3.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_5.0.0/","title":"5.0.0 - 2023-10-08","text":"

    \ud83d\ude80 This release is powered by Gert van Dijk, thank you for your contribution!

    "},{"location":"changelog/changes_5.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_5.0.0/#added","title":"\u2728 Added","text":""},{"location":"changelog/changes_5.0.0/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_5.0.0/#internal-development","title":"\ud83d\udd29 Internal / Development","text":""},{"location":"changelog/changes_6.0.0/","title":"6.0.0 - 2023-12-02","text":""},{"location":"changelog/changes_6.0.0/#breaking-changes","title":"\ud83d\udea8\ufe0f Breaking Changes","text":""},{"location":"changelog/changes_6.0.0/#bug-fix","title":"\ud83d\udc1e Bug Fix","text":""},{"location":"changelog/changes_6.0.0/#internal-development","title":"\ud83d\udd29 Internal / Development","text":""},{"location":"changelog/changes_6.1.0/","title":"6.1.0 - 2023-12-30","text":"

    \ud83d\ude80 This release is powered by Riccardo Malavolti, thank you for your contribution!

    "},{"location":"changelog/changes_6.1.0/#features","title":"\u2728 Features","text":""},{"location":"changelog/changes_6.1.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_6.1.1/","title":"6.1.1 - 2024-02-10","text":"

    \ud83d\ude80 This release is powered by Ramya-Ab, thank you for your contribution!

    "},{"location":"changelog/changes_6.1.1/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_6.1.1/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_6.1.2/","title":"6.1.2 - 2024-04-14","text":""},{"location":"changelog/changes_6.1.2/#bug-fixes","title":"\ud83d\udc1e Bug Fixes","text":""},{"location":"changelog/changes_6.1.2/#documentation","title":"\ud83d\udcda Documentation","text":""},{"location":"changelog/changes_6.1.2/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/changes_7.0.0/","title":"7.0.0 - 2024-04-19","text":""},{"location":"changelog/changes_7.0.0/#breaking-changes","title":"\ud83d\udea8 Breaking Changes","text":""},{"location":"changelog/changes_7.0.0/#update-of-crc-configurations","title":"Update of crc configurations","text":""},{"location":"changelog/changes_7.0.0/#decision-rationale","title":"Decision Rationale","text":"

    It was intentionally decided not to reintroduce Crc16.CCITT with the updated configuration. While it could have been added as an alias for Crc16.KERMIT or a replacement, omitting Crc16.CCITT ensures that client code will break upon update, thereby forcing maintainers to take notice and react accordingly.

    "},{"location":"changelog/changes_7.0.0/#migration-guide","title":"Migration Guide","text":"

    Below are solutions to the two common scenarios that need to be addressed due to this change:

    1. If you previously used Crc16.CCITT and expected the configuration defined here:

      Solution: Replace all usages of Crc16.CCITT in your code with Crc16.KERMIT.

    2. If you depended on or wanted to use the configuration values that Crc16.CCITT provided so far:

      Solution: Replace all usages of Crc16.CCITT in your code with Crc16.XMODEM.

    "},{"location":"changelog/changes_7.0.0/#related-issues","title":"Related Issues","text":""},{"location":"changelog/changes_7.0.0/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"changelog/unreleased/","title":"Unreleased","text":""},{"location":"changelog/unreleased/#features","title":"\u2728 Features","text":""},{"location":"changelog/unreleased/#internal","title":"\ud83d\udd29 Internal","text":""},{"location":"development/release/","title":"Release","text":""},{"location":"development/release/#create-a-release-using-the-github-release-workflow","title":"Create a release using the GitHub release workflow","text":"
    1. Rename unreleased.md to changes_{X.Y.Z}.md
    2. Update heading in changes_{X.Y.Z}.md to reflect the release version
    3. Add the current date behind the release number
      # X.Y.Z - YYYY-MM-DD\n
    4. Prepare the release
      invoke release.prepare X.Y.Z\n
    5. Run the CI/CD pipeline to publish the release: Execute the release.workflow task and follow potential instructions.
      invoke release.workflow X.Y.Z\n
    "},{"location":"development/setup/","title":"Setup","text":""},{"location":"development/setup/#requirements-tldr","title":"Requirements TL;DR","text":""},{"location":"development/setup/#1-install-poetry","title":"1. Install Poetry","text":"

    Follow the poetry installation instructions.

    "},{"location":"development/setup/#2-install-gh","title":"2. Install gh","text":"

    Follow the gh installation instructions.

    "},{"location":"development/setup/#3-checkout-the-project","title":"3. Checkout the project","text":"GitHub CLISSHHTTPS
    gh repo clone Nicoretti/crc\n
    git clone git@github.com:Nicoretti/crc.git\n
    git clone https://github.com/Nicoretti/crc.git\n
    "},{"location":"development/setup/#4-switch-into-the-directory","title":"4. Switch into the directory","text":"
    cd crc\n
    "},{"location":"development/setup/#5-the-poetry-environment","title":"5. The Poetry environment","text":"

    Make sure the poetry environment is setup properly and all dependencies are installed.

    1. Activate the Poetry shell

      poetry shell\n
    2. Install the project dependencies

      poetry install\n
    "},{"location":"development/setup/#run-the-init-task","title":"Run the init task","text":"

    In order to bootstrap the remaining parts of the workspace setup, just execute the following command:

    invoke init\n

    Note

    Follow potential instructions.

    "}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 27f3233..6b69326 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,152 +2,152 @@ https://nicoretti.github.io/crc/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/cli/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/configurations/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/contributors/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/abstract_register/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/basic_register/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/calculator/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/configuration/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/crc16/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/crc32/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/crc64/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/crc8/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/register/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/api/table_based_register/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_2.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_3.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_3.0.1/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_4.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_4.1.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_4.2.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_4.3.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_5.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_6.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_6.1.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_6.1.1/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_6.1.2/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/changes_7.0.0/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/changelog/unreleased/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/development/release/ - 2024-07-06 + 2024-11-05 daily https://nicoretti.github.io/crc/development/setup/ - 2024-07-06 + 2024-11-05 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 68a338c..61cc594 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ