mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
examples/psa_crypto: place input data in RAM
This commit is contained in:
parent
e8be6eec09
commit
17915037b8
@ -22,8 +22,10 @@
|
||||
|
||||
#include "psa/crypto.h"
|
||||
|
||||
static const uint8_t msg[] = "Hello World!";
|
||||
static const size_t msg_len = sizeof(msg)-1; // exclude NULL-byte
|
||||
/* certain PSA backends require the data to be in RAM rather than ROM
|
||||
* so these values cannot be `const` */
|
||||
static uint8_t msg[] = "Hello World!";
|
||||
static size_t msg_len = sizeof(msg)-1; // exclude NULL-byte
|
||||
|
||||
static const uint8_t hash_sha224[] = {
|
||||
0x45, 0x75, 0xbb, 0x4e, 0xc1, 0x29, 0xdf, 0x63, 0x80, 0xce, 0xdd, 0xe6, 0xd7,
|
||||
|
||||
@ -30,7 +30,9 @@ static const uint8_t HMAC_KEY[] = {
|
||||
};
|
||||
static size_t HMAC_KEY_LEN = 32;
|
||||
|
||||
static const uint8_t HMAC_MSG[] = {
|
||||
/* certain PSA backends require the data to be in RAM rather than ROM
|
||||
* so these values cannot be `const` */
|
||||
static uint8_t HMAC_MSG[] = {
|
||||
0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
|
||||
0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x73, 0x74,
|
||||
0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user