Skip to content

Commit e9cb761

Browse files
committed
getting-started: Explain why we have global keys
Make it more clear that one should not have global, hard-coded keys in their code. We do this for example purposes only and real-world applications should follow secure practices.
1 parent 58ee0a9 commit e9cb761

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

getting-started/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@
3232
0x0e, 0x42, 0x75, 0x78, 0xb5, 0x0d, 0x17, 0x4f, \
3333
0x6e, 0x13, 0xf4, 0xfd, 0x16, 0x30, 0x3e, 0xc7, \
3434
}
35+
/* This key is present as a global define for the purpose of example. In
36+
* real-world applications, you would not have a key hardcoded in source like
37+
* this. */
3538
#define AES_KEY \
3639
{ \
3740
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, \
3841
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, \
3942
}
43+
/* This key is present as a global define for the purpose of example. In
44+
* real-world applications, you would not have a key hardcoded in source like
45+
* this. */
4046
#define RSA_KEY \
4147
{ \
4248
0x30, 0x82, 0x02, 0x5e, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xaf, 0x05, \

0 commit comments

Comments
 (0)