File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Testing examples
2
+
3
+ Examples are tested using tool [ htrun] ( https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests ) and templated print log.
4
+
5
+ To run the test, use following command after you build the example:
6
+ ```
7
+ mbedhtrun -d D: -p COM4 -m K64F -f .\BUILD\K64F\GCC_ARM\devicekey.bin --compare-log tests\devicekey.log
8
+ ```
9
+
10
+
11
+ More details about ` htrun ` are [ here] ( https://github.com/ARMmbed/htrun#testing-mbed-os-examples ) .
12
+
Original file line number Diff line number Diff line change
1
+ --- Mbed OS DeviceKey example ---
2
+
3
+ --- Using the following salt for key derivation: SALT1 ----- SALT1 ------ SALT1 ---
4
+ --- First call to derive key, requesting derived key of 16 byte ---
5
+ --- Derived key1 is:
6
+ [0-9A-F]+
7
+
8
+ --- Second call to derive key with the same salt. ---
9
+ --- Derived key2 should be equal to key1 from the first call. key2 is:
10
+ [0-9A-F]+
11
+ --- Keys match ---
12
+
13
+ --- Using the following salt for key derivation SALT2 ----- SALT2 ------ SALT2 ---
14
+ --- Third call to derive key with the different salt should result with a new derived key1:
15
+ [0-9A-F]+
16
+ --- Keys not match ---
17
+
18
+ --- 32 byte key derivation example. ---
19
+ --- 32 byte derived key is:
20
+ [0-9A-F]+
21
+
22
+ --- Mbed OS DeviceKey example done. ---
You can’t perform that action at this time.
0 commit comments