PSA_KEY_LIFETIME_IS_READ_ONLY macro
Whether a key lifetime indicates that the key is read-only. Read-only keys cannot be created or destroyed through the PSA Crypto API. They must be created through platform-specific means that bypass the API. Some platforms may offer ways to destroy read-only keys. For example, consider a platform with multiple levels of privilege, where a low-privilege application can use a key but is not allowed to destroy it, and the platform exposes the key to the application with a read-only lifetime. High-privilege code can destroy the key even though the application sees the key as read-only.
Arguments
lifetime
The lifetime value to query (value of type ::psa_key_lifetime_t).
Return value
\c 1 if the key is read-only, otherwise \c 0.