CRC32.cls

CRC32 is an algorithm used to create a validation string of data.

History:

  • 04.09.2001, version 1.0.

Properties:

  • Check as String: (Taken from: Fil's FAQ-Link-In Corner: CRC algorithms) This field is a check value that can be used as a weak validator of implementations of the algorithm. The field contains the checksum obtained when the ASCII string "123456789" is fed through the specified algorithm.
  • CheckSum as Long: Last validation string generated by the algorithm.
  • Poly as String: The poly used in the CRC32 algorithm. For this implementation, this is a fixed value.

Methods:

  • CRC (arrData() as Byte) as Long: With this method you calculate the CRC32 validation string. Pass the data in an array to arrData, and the method returns the result as a Long type.

Example:

    Dim CRC32 As CRC32, lResult As Long
    Set CRC32 = New CRC32
    lResult = CRC32.CRC(arrData)

 

(1 Kb)