e-CryptIt Engine - Checksums Xojo Plugin |
|
CRC16 Class
A class to calculate CRC16 checksums. On strings, bytes or streams.
The class supports the following CRC16 variations:
GENERIC
AUG_CCITT
CCITT
DECT_R
DECT_X
EN_13757
GENIBUS
T10_DIF
TELEDISK
BUYPASS
DDS_110
DNP
MAXIM
RIELLO
MCRF4XX
TMS37157
USB
CRC_A
KERMIT
MODBUS
IBM_SDLC
Constructors
CRC16 | Constructor that takes CRC16MethodEnum selector to choose CRC16 variation. |
CRC16 | A constructor to create instance of CRC16 with settings for custom variation. |
Properties
Methods
Final | Gets the final checksum from the CRC. |
shared PluginVersion | Returns the version number of the plugin. |
Reset | Resets the CRC stream. |
Update | Updates the CRC checksum with a string. |
UpdateByte | Updates the CRC checksum with a single byte |
UpdateMemoryBlock | Updates the CRC checksum with a memory block taking all bytes from the block. |
UpdateMemoryBlock | Updates the CRC checksum with a memory block taking selected bytes from the block. |
Enumerations
CRC16MethodEnum | A enum to supply for the CRC16 constructor to choose CRC16 variation. |
Examples
Dim crc as CRC16 = new CRC16(CRC16.CRC16MethodEnum.CRC16_CCITT)
Dim value as UInt16
Dim testData as String = "123456789"
testData = testData.ConvertEncoding(Encodings.ASCII)
value = crc.Update(testData,crc.ReferenceInitValue)
MsgBox Hex(crc.Final(value))
Supported Platforms:
MacOS X Cocoa 32 bitMacOS X Cocoa 64 bitWindows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARMUnsupported Platforms:
MacOS X Carbon