Lines Matching defs:storage_format
241 psa_persistent_key_storage_format *storage_format =
244 memcpy(storage_format->magic, PSA_KEY_STORAGE_MAGIC_HEADER,
246 MBEDTLS_PUT_UINT32_LE(0, storage_format->version, 0);
247 MBEDTLS_PUT_UINT32_LE(attr->lifetime, storage_format->lifetime, 0);
248 MBEDTLS_PUT_UINT16_LE((uint16_t) attr->type, storage_format->type, 0);
249 MBEDTLS_PUT_UINT16_LE((uint16_t) attr->bits, storage_format->bits, 0);
250 MBEDTLS_PUT_UINT32_LE(attr->policy.usage, storage_format->policy, 0);
251 MBEDTLS_PUT_UINT32_LE(attr->policy.alg, storage_format->policy, sizeof(uint32_t));
252 MBEDTLS_PUT_UINT32_LE(attr->policy.alg2, storage_format->policy, 2 * sizeof(uint32_t));
253 MBEDTLS_PUT_UINT32_LE(data_length, storage_format->data_len, 0);
254 memcpy(storage_format->key_data, data, data_length);
273 const psa_persistent_key_storage_format *storage_format =
277 if (storage_data_length < sizeof(*storage_format)) {
286 version = MBEDTLS_GET_UINT32_LE(storage_format->version, 0);
291 *key_data_length = MBEDTLS_GET_UINT32_LE(storage_format->data_len, 0);
292 if (*key_data_length > (storage_data_length - sizeof(*storage_format)) ||
304 memcpy(*key_data, storage_format->key_data, *key_data_length);
307 attr->lifetime = MBEDTLS_GET_UINT32_LE(storage_format->lifetime, 0);
308 attr->type = MBEDTLS_GET_UINT16_LE(storage_format->type, 0);
309 attr->bits = MBEDTLS_GET_UINT16_LE(storage_format->bits, 0);
310 attr->policy.usage = MBEDTLS_GET_UINT32_LE(storage_format->policy, 0);
311 attr->policy.alg = MBEDTLS_GET_UINT32_LE(storage_format->policy, sizeof(uint32_t));
312 attr->policy.alg2 = MBEDTLS_GET_UINT32_LE(storage_format->policy, 2 * sizeof(uint32_t));