e-CryptIt Engine REALbasic Plugin

Crc16_MemoryBlock Method

To compute a checksum using the Crc16 algorithm on a MemoryBlock then user the Crc16_MemoryBlock function.

Crc16_MemoryBlock(
   bytes as MemoryBlock,
   offset as Integer,
   length as Integer,
   crc as Integer) as Integer

Parameters

bytes
The bytes to calculate.
offset
The offset where in the MemoryBlock to start. (Fyrst byte in the MemoryBlock is 0)
length
The number of bytes in the memory block to do Crc16 checksum on.
crc
The crc16 value to calculate from.

Returns

Integer

Remarks

A good way to represent the checksum as an Hex string:

myString = Right("0000"+HEX(myCrc), 4)

Supported Platforms:

  • PPC - MacOS 9
  • Carbon - MacOS 9 and MacOS X (PEF)
  • MacOS X PPC - (Mach-O)
  • MacOS X Universal Binary (Mach-O)
  • Win32 - Windows
  • Linux x86

    See Also

    GlobalMethods Global