Encr_Checksum (function reference)

By August 1, 2017 September 26th, 2017 Online 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

switchesreserved for future use, leave empty or set to "-Unused"
textthe 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 12 to 16

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.

Related functionFunction badge

Encr_MakeDigest

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 12 to 16 –> Encr_Checksum (encrp4211) 2017-0814 18:07:16