Skip to main content

Encr_TextSignature (function reference)

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

Encr_TextSignature

Generates a signature of the characters that you can see. This means that only characters a-z, A-Z and 0-9 are used to generate the signature. So adding non-printing characters like spaces and returns doesn’t change the signature.

SyntaxFunction badge

Encr_TextSignature ( switches ;  text )

Parameters

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

Returned Result

Data type returned

Text

Result

Signature: a string of 24 characters.

Originated in

Troi Encryptor Plug-in 1.2

Compatibility

FileMaker Pro 16 to FileMaker Pro 2023

Considerations

See also the Encr_MakeDigest function for a more robust check if text is the same.

The characters in the result are all lower ASCII and are therefore safe to send across internet.

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

Example

Set Field [ result ; Encr_TextSignature ( "-Unused" ; 
			"Here is a sample text that you can see the signature of." ) ]

gives this result: “Cqd5yentvR5TN9bYSHG2MKdZ”

Example 2

You can use this function to check if the (meaning) of a text was not changed, by adding the signature to the message.

Send Message [ message & "¶Signature=" & Encr_TextSignature ( "-Unused" ; message ) ]

At the receiving end you need these fields:

signaturePos		= Position ( messageReceived ; "¶Signature=" ; 1 ; 1 )
messageClean   		= Left ( messageReceived ; signaturePos )
signatureReceived  	= Middle ( messageReceived ;  signaturePos + 12 ; 
				Length ( messageReceived ) )
messageOK  		= Encr_TextSignature ( "-Unused" ; messageClean ) = signatureReceived

Used in example file

CheckSignature.fmp12

Related functionsFunction badge

Encr_Checksum
Encr_MakeDigest

Related topics

Troi Encryptor Plug-in online help (overview)


Online Help Page for Troi Encryptor Plug-in for 16 to 2023 –> Encr_TextSignature (encrp4291) 2023-0425 16:01:30