StringCompareEncrypted() Function
- Last UpdatedJan 22, 2026
- 1 minute read
Compares an encrypted string with an unencrypted string and returns a Boolean result. You can use this function for password verification. For more information on password encryption, see Animate objects.
Syntax
result = StringCompareEncrypted (plain, encrypted)
Parameters
plain
A literal string, message tagname, or string expression.
encrypted
An encrypted message tagname.
Example(s)
This script returns 1 when the plain text and the encrypted text are identical, otherwise it returns 0. Passwd is a message tag containing a value from an encrypted user input. PlainTxt is a message tag against which the user input is to be compared.
StringCompareEncrypted(PlainTxt, Passwd)
Note: Starting with InTouch HMI 2026, StringCompareEncrypted() function is deprecated, and will therefore not be available for use in InTouch scripts. Importantly, after the upgrade of the InTouch application, all occurrences of the StringCompareEncrypted script function will have no effect at runtime and will always return 0.