Buildings.Utilities.Cryptographics

Package with cryptographic functions

Information

This package contains utility models for performing cryptographic operations.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Utilities.Cryptographics.sha sha SHA1 encryption of a String
Buildings.Utilities.Cryptographics.Validation Validation Validation models for cryptographic functions.

Buildings.Utilities.Cryptographics.sha Buildings.Utilities.Cryptographics.sha

SHA1 encryption of a String

Information

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.

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Stringstr String to be encrypted

Outputs

TypeNameDescription
Stringsha1SHA1-encrypted string

Modelica definition

pure function sha "SHA1 encryption of a String" extends Modelica.Icons.Function; input String str "String to be encrypted"; output String sha1 "SHA1-encrypted string"; external "C" sha1 = cryptographicsHash(str); end sha;