Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CalculateCRC16MemoryMBS(data as MemoryBlock, Start as UInt16 = 65535, Polynomial as UInt16 = &h1021, FinalXOR as UInt16 = 0, ReflectInput as boolean = false, ReflectOutput as boolean = false) as UInt16
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Encryption and Hash MBS Util Plugin 16.4 Yes Yes Yes Yes No
Function: Calculates a 16bit Checksum about the provided memoryblock.
Notes:
Start is the start value.
Polynominal is what is xored to the value in each round.
FinalXOR is an XOR we do on the end.
If ReflectInput is true, we swap bits in input.
If ReflectOutput is true, we swap bits in output (before final XOR).

Returns CRC value.

Feedback, Comments & Corrections

CalculateCRC16StringMBS(data as string, Start as UInt16 = 65535, Polynomial as UInt16 = &h1021, FinalXOR as UInt16 = 0, ReflectInput as boolean = false, ReflectOutput as boolean = false) as UInt16
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method Encryption and Hash MBS Util Plugin 16.4 Yes Yes Yes Yes No
Function: Calculates a 16bit Checksum about the provided string.
Example:
dim c as string = DecodeHex("3E4400026201000D")
dim p as UInt16 = CalculateCRC16StringMBS(c, &hFFFF, &h1021, 0, true, true)
MsgBox hex(p)+" = 3E5A"
Notes:
Start is the start value.
Polynominal is what is xored to the value in each round.
FinalXOR is an XOR we do on the end.
If ReflectInput is true, we swap bits in input.
If ReflectOutput is true, we swap bits in output (before final XOR).

Returns CRC value.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.




Links
MBS FileMaker Plugins