Skip to main content

Encr_Checksum (function reference)

By April 20, 2023April 25th, 2023Online Help, Troi Encryptor Plug-in
Troi Encryptor Plug-in for FileMaker Pro

Encr_Checksum

Sum of the ASCII values of the characters modulo 1024. ALL characters are counted, also non-printing characters like spaces and returns.

SyntaxFunction badge

Encr_Checksum ( switches ; text )

Parameters

switches reserved for future use, leave empty or set to "-Unused"
text the text to calculate the checksum of

Returned Result

Data type returned

Number

Result

a number

Originated in

Troi Encryptor Plug-in 1.2

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

A checksum might be the same for 2 different texts. The chance on this is normally quite low (one in 1024).
See also the Encr_MakeDigest function for a more robust check if text is the same.

Compatibility with Troi Coding Plug-in:
Text is converted to the FileMaker Pro 6 character set. For other characters the UNICODE value sum modulo 1024 is used. This ensures that fields with data from older FileMaker 6 databases will have the same checksum.

Example

Set Field [ result ; Encr_Checksum ( "-Unused" ;  "Hello world." ) ]

will give a result of 106.

You can use this function to see if the contents of a field has changed. You store the checksum and then later compare it to the current checksum.

Used in example file

CheckSignature.fmp12

Related functionFunction badge

Encr_MakeDigest

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 16 to 2023 –> Encr_Checksum (encrp4211) 2023-0425 15:43:14