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 |
---|---|
sha | SHA1 encryption of a String |
Validation | Validation models for cryptographic functions. |
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
Type | Name | Default | Description |
---|---|---|---|
String | str | String to be encrypted |
Outputs
Type | Name | Description |
---|---|---|
String | sha1 | SHA1-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;