ARMmbed / mbed-os-example-mbed-crypto

Mbed Crypto example for Mbed OS 5
Apache License 2.0
5 stars 19 forks source link

getting-started: Align with upstream getting started snippets, comment about pedagogical code, and reduce stack usage #49

Closed Patater closed 5 years ago

Patater commented 5 years ago
Patater commented 5 years ago

Tested with ARMC6 and the develop profile. IAR not yet tested.

Patater commented 5 years ago

This is not meant as any sort of workaround. This is meant to reduce stack usage to make the example more portable. We could use a global key instead if use of static in this situation appears uncouth.

Patater commented 5 years ago

New patchset uses static const for key and adds a comment explaining why the writable signature is static, as that might be a bit surprising. static const is idiomatic enough that it doesn't need a comment.

Patater commented 5 years ago

Buddy PR at https://github.com/ARMmbed/mbed-crypto/pull/317

Patater commented 5 years ago

New patchset makes the keys global static const instead to reduce RAM usage, while also improving the readability of the example.

gilles-peskine-arm commented 5 years ago

e46b6adcefcfe0eff770f682f9ca513092cd9751 passed CI with ARM Compiler reinstated in https://jenkins-internal.mbed.com/job/mbed-crypto-release-ci-testing/577 .