e-CryptIt Engine - Checksums Xojo Plugin

CRC8 Class

A class to calculate CRC8 checksums. On strings, bytes or streams.

The class supports the following CRC8 variations:
  • GENERIC
  • ITU
  • ROHC
  • DARC
  • I_CODE
  • J1850
  • MAXIM
  • WCDMA
  • CCITT
  • EBU

    Object
       CRC8

    class CRC8

    Constructors

    CRC8 (console safe) Constructor that takes CRC8MethodEnum selector to choose CRC8 variation.
    CRC8 (console safe) A constructor to create instance of CRC8 with settings for custom variation.

    Properties

    ReferenceInitValue (console safe) A reference starting value for the CRC for the selected CRC variation.

    Methods

    Final (console safe) Gets the final checksum from the CRC.
    shared PluginVersionReturns the version number of the plugin.
    Reset (console safe) Resets the CRC stream.
    Update (console safe) Updates the CRC checksum with a string.
    UpdateByte (console safe) Updates the CRC checksum with a single byte
    UpdateMemoryBlock (console safe) Updates the CRC checksum with a memory block taking all bytes from the block.
    UpdateMemoryBlock (console safe) Updates the CRC checksum with a memory block taking selected bytes from the block.

    Enumerations

    CRC8MethodEnumA enum to supply for the CRC8 constructor to choose CRC8variation.

    Examples


    Dim crc as CRC8 = new CRC8(CRC8.CRC8MethodEnum.CRC8_GENERIC)
    Dim value8 as UInt8
    Dim testData as String = "123456789"

    testData = testData.ConvertEncoding(Encodings.ASCII)

    value8 = crc.Update(testData, crc.ReferenceInitValue)
    MsgBox(testData,Hex(crc.Final(value8))

    Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS