Skip to content

Commit a452350

Browse files
committed
Added CBOM graph-based unit tests for .NET
1 parent 0fc2427 commit a452350

14 files changed

+172
-45
lines changed

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_input_sources.expected

Lines changed: 0 additions & 3 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_input_sources.ql

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_key_sources.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_key_sources.ql

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_nonce_sources.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_nonce_sources.ql

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_operations.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

csharp/ql/test/experimental/library-tests/quantum/dotnet/ciphers/cipher_operations.ql

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
| AesCbcExample.cs:36:21:36:27 | Key | Source | AesCbcExample.cs:76:30:76:32 | RandomNumberGeneration |
2+
| AesCbcExample.cs:38:28:38:80 | EncryptOperation | Algorithm | AesCbcExample.cs:38:28:38:80 | KeyOperationAlgorithm |
3+
| AesCbcExample.cs:38:28:38:80 | EncryptOperation | Input | AesCbcExample.cs:38:43:38:56 | Message |
4+
| AesCbcExample.cs:38:28:38:80 | EncryptOperation | Key | AesCbcExample.cs:36:21:36:27 | Key |
5+
| AesCbcExample.cs:38:28:38:80 | EncryptOperation | Nonce | AesCbcExample.cs:38:59:38:60 | Nonce |
6+
| AesCbcExample.cs:38:28:38:80 | EncryptOperation | Output | AesCbcExample.cs:38:28:38:80 | KeyOperationOutput |
7+
| AesCbcExample.cs:38:28:38:80 | KeyOperationAlgorithm | Mode | AesCbcExample.cs:38:28:38:80 | ModeOfOperation |
8+
| AesCbcExample.cs:38:28:38:80 | KeyOperationAlgorithm | Padding | AesCbcExample.cs:38:63:38:79 | PaddingAlgorithm |
9+
| AesCbcExample.cs:38:43:38:56 | Message | Source | AesCbcExample.cs:38:43:38:56 | Message |
10+
| AesCbcExample.cs:38:59:38:60 | Nonce | Source | AesCbcExample.cs:86:30:86:31 | RandomNumberGeneration |
11+
| AesCbcExample.cs:60:21:60:27 | Key | Source | AesCbcExample.cs:76:30:76:32 | RandomNumberGeneration |
12+
| AesCbcExample.cs:61:45:61:93 | DecryptOperation | Algorithm | AesCbcExample.cs:61:45:61:93 | KeyOperationAlgorithm |
13+
| AesCbcExample.cs:61:45:61:93 | DecryptOperation | Input | AesCbcExample.cs:61:60:61:69 | Message |
14+
| AesCbcExample.cs:61:45:61:93 | DecryptOperation | Key | AesCbcExample.cs:60:21:60:27 | Key |
15+
| AesCbcExample.cs:61:45:61:93 | DecryptOperation | Nonce | AesCbcExample.cs:61:72:61:73 | Nonce |
16+
| AesCbcExample.cs:61:45:61:93 | DecryptOperation | Output | AesCbcExample.cs:61:45:61:93 | KeyOperationOutput |
17+
| AesCbcExample.cs:61:45:61:93 | KeyOperationAlgorithm | Mode | AesCbcExample.cs:61:45:61:93 | ModeOfOperation |
18+
| AesCbcExample.cs:61:45:61:93 | KeyOperationAlgorithm | Padding | AesCbcExample.cs:61:76:61:92 | PaddingAlgorithm |
19+
| AesCbcExample.cs:61:60:61:69 | Message | Source | AesCbcExample.cs:38:28:38:80 | KeyOperationOutput |
20+
| AesCbcExample.cs:61:72:61:73 | Nonce | Source | AesCbcExample.cs:86:30:86:31 | RandomNumberGeneration |
21+
| AesCfbExample.cs:31:17:31:23 | Key | Source | AesCfbExample.cs:87:30:87:32 | RandomNumberGeneration |
22+
| AesCfbExample.cs:32:17:32:22 | Nonce | Source | AesCfbExample.cs:97:30:97:31 | RandomNumberGeneration |
23+
| AesCfbExample.cs:36:46:36:66 | KeyOperationAlgorithm | Mode | AesCfbExample.cs:33:28:33:41 | ModeOfOperation |
24+
| AesCfbExample.cs:36:46:36:66 | KeyOperationAlgorithm | Padding | AesCfbExample.cs:34:31:34:46 | PaddingAlgorithm |
25+
| AesCfbExample.cs:42:53:42:114 | EncryptOperation | Algorithm | AesCfbExample.cs:36:46:36:66 | KeyOperationAlgorithm |
26+
| AesCfbExample.cs:42:53:42:114 | EncryptOperation | Input | AesCfbExample.cs:44:41:44:50 | Message |
27+
| AesCfbExample.cs:42:53:42:114 | EncryptOperation | Key | AesCfbExample.cs:31:17:31:23 | Key |
28+
| AesCfbExample.cs:42:53:42:114 | EncryptOperation | Nonce | AesCfbExample.cs:32:17:32:22 | Nonce |
29+
| AesCfbExample.cs:42:53:42:114 | EncryptOperation | Output | AesCfbExample.cs:47:33:47:51 | KeyOperationOutput |
30+
| AesCfbExample.cs:44:41:44:50 | Message | Source | AesCfbExample.cs:44:41:44:50 | Message |
31+
| AesCfbExample.cs:63:46:63:73 | KeyOperationAlgorithm | Mode | AesCfbExample.cs:59:28:59:41 | ModeOfOperation |
32+
| AesCfbExample.cs:63:46:63:73 | KeyOperationAlgorithm | Padding | AesCfbExample.cs:60:31:60:46 | PaddingAlgorithm |
33+
| AesCfbExample.cs:63:66:63:68 | Key | Source | AesCfbExample.cs:87:30:87:32 | RandomNumberGeneration |
34+
| AesCfbExample.cs:63:71:63:72 | Nonce | Source | AesCfbExample.cs:97:30:97:31 | RandomNumberGeneration |
35+
| AesCfbExample.cs:66:66:66:75 | Message | Source | AesCfbExample.cs:47:33:47:51 | KeyOperationOutput |
36+
| AesCfbExample.cs:68:53:68:113 | DecryptOperation | Algorithm | AesCfbExample.cs:63:46:63:73 | KeyOperationAlgorithm |
37+
| AesCfbExample.cs:68:53:68:113 | DecryptOperation | Input | AesCfbExample.cs:66:66:66:75 | Message |
38+
| AesCfbExample.cs:68:53:68:113 | DecryptOperation | Key | AesCfbExample.cs:63:66:63:68 | Key |
39+
| AesCfbExample.cs:68:53:68:113 | DecryptOperation | Nonce | AesCfbExample.cs:63:71:63:72 | Nonce |
40+
| AesCfbExample.cs:68:53:68:113 | DecryptOperation | Output | AesCfbExample.cs:73:49:73:65 | KeyOperationOutput |
41+
| AesGcmExample.cs:26:41:26:43 | Key | Source | AesGcmExample.cs:53:30:53:32 | RandomNumberGeneration |
42+
| AesGcmExample.cs:31:17:31:67 | EncryptOperation | Algorithm | AesGcmExample.cs:31:17:31:67 | KeyOperationAlgorithm |
43+
| AesGcmExample.cs:31:17:31:67 | EncryptOperation | Input | AesGcmExample.cs:31:36:31:49 | Message |
44+
| AesGcmExample.cs:31:17:31:67 | EncryptOperation | Key | AesGcmExample.cs:26:41:26:43 | Key |
45+
| AesGcmExample.cs:31:17:31:67 | EncryptOperation | Nonce | AesGcmExample.cs:31:29:31:33 | Nonce |
46+
| AesGcmExample.cs:31:17:31:67 | EncryptOperation | Output | AesGcmExample.cs:31:52:31:61 | KeyOperationOutput |
47+
| AesGcmExample.cs:31:17:31:67 | KeyOperationAlgorithm | Mode | AesGcmExample.cs:31:17:31:67 | ModeOfOperation |
48+
| AesGcmExample.cs:31:17:31:67 | KeyOperationAlgorithm | Padding | AesGcmExample.cs:31:17:31:67 | KeyOperationAlgorithm |
49+
| AesGcmExample.cs:31:29:31:33 | Nonce | Source | AesGcmExample.cs:63:30:63:34 | RandomNumberGeneration |
50+
| AesGcmExample.cs:31:36:31:49 | Message | Source | AesGcmExample.cs:31:36:31:49 | Message |
51+
| AesGcmExample.cs:39:41:39:43 | Key | Source | AesGcmExample.cs:53:30:53:32 | RandomNumberGeneration |
52+
| AesGcmExample.cs:42:17:42:67 | DecryptOperation | Algorithm | AesGcmExample.cs:42:17:42:67 | KeyOperationAlgorithm |
53+
| AesGcmExample.cs:42:17:42:67 | DecryptOperation | Input | AesGcmExample.cs:42:36:42:45 | Message |
54+
| AesGcmExample.cs:42:17:42:67 | DecryptOperation | Key | AesGcmExample.cs:39:41:39:43 | Key |
55+
| AesGcmExample.cs:42:17:42:67 | DecryptOperation | Nonce | AesGcmExample.cs:42:29:42:33 | Nonce |
56+
| AesGcmExample.cs:42:17:42:67 | DecryptOperation | Output | AesGcmExample.cs:42:53:42:66 | KeyOperationOutput |
57+
| AesGcmExample.cs:42:17:42:67 | KeyOperationAlgorithm | Mode | AesGcmExample.cs:42:17:42:67 | ModeOfOperation |
58+
| AesGcmExample.cs:42:17:42:67 | KeyOperationAlgorithm | Padding | AesGcmExample.cs:42:17:42:67 | KeyOperationAlgorithm |
59+
| AesGcmExample.cs:42:29:42:33 | Nonce | Source | AesGcmExample.cs:63:30:63:34 | RandomNumberGeneration |
60+
| AesGcmExample.cs:42:36:42:45 | Message | Source | AesGcmExample.cs:31:52:31:61 | KeyOperationOutput |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import csharp
2+
import experimental.quantum.Language
3+
4+
from Crypto::NodeBase n, string key
5+
select n, key, n.getChild(key)

0 commit comments

Comments
 (0)