1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Rename psa_generate_random_key back to psa_generate_key

generate_key is a more classical name. The longer name was only
introduced to avoid confusion with getting a key from a generator,
which is key derivation, but we no longer use the generator
terminology so this reason no longer applies.

perl -i -pe 's/psa_generate_random_key/psa_generate_key/g' $(git ls-files)
This commit is contained in:
Gilles Peskine
2019-05-16 19:42:05 +02:00
parent c93b80c350
commit 35ef36b62f
10 changed files with 24 additions and 24 deletions

View File

@ -494,7 +494,7 @@ Prerequisites to using key generation and export APIs:
Generate a piece of random 128-bit AES data:
1. Set the key policy for key generation by calling `psa_key_policy_set_usage()` with the `PSA_KEY_USAGE_EXPORT` parameter and the algorithm `PSA_ALG_GCM`.
1. Generate a random AES key by calling `psa_generate_random_key()`.
1. Generate a random AES key by calling `psa_generate_key()`.
1. Export the generated key by calling `psa_export_key()`:
```C
int slot = 1;
@ -510,7 +510,7 @@ Generate a piece of random 128-bit AES data:
psa_set_key_policy(slot, &policy);
/* Generate a key */
psa_generate_random_key(slot, PSA_KEY_TYPE_AES, bits);
psa_generate_key(slot, PSA_KEY_TYPE_AES, bits);
psa_export_key(slot, exported, exported_size, &exported_length)