This function takes a String input and, using an external function written in C, outputs its SHA1 encryption. The input string can be of any length, though the output will always be 40 hexadecimal characters.
pure function sha extends Modelica.Icons.Function; input String str "String to be encrypted"; output String sha1 "SHA1-encrypted string"; end sha;
pure
declaration for MSL 4.0.0.