Buildings.Utilities.Cryptographics.Validation
Validation models for cryptographic functions.
Information
This package contains models for validation of cryptographic functions. The examples plot various outputs, which have been verified against comparative results. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name | Description |
---|---|
SHA1 | Model that verifies the SHA1 encryption C function |
Buildings.Utilities.Cryptographics.Validation.SHA1
Model that verifies the SHA1 encryption C function
Information
This validation function tests the C implementation of the SHA1 encryption for the following strings:
-
"abc"
-
""
(an empty string) -
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
-
"1.23e+4"
-
"a"
repeated 509 times.
If the encrypted strings are identical to the expected (known) encryption
results, the cmpAll
boolean variable will be true
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
---|---|---|---|
String | strIn1 | "abc" | First test string |
String | strIn2 | "" | Second test string |
String | strIn3 | "abcdbcdecdefdefgefghfghighi... | Third test string |
String | strIn4 | "1.23e+4" | Fourth test string |
String | strIn5 | Modelica.Utilities.Strings.r... | Fifth test string |
String | strEx1 | "a9993e364706816aba3e2571785... | Encryption result of first string |
String | strEx2 | "da39a3ee5e6b4b0d3255bfef956... | Encryption result of second string |
String | strEx3 | "84983e441c3bd26ebaae4aa1f95... | Encryption result of third string |
String | strEx4 | "bdd220adb45b392f17915af70ed... | Encryption result of fourth string |
String | strEx5 | "edff7a135c2e06d4c8084e61b45... | Encryption result of fifth string |