PSA_ALG_IS_HASH_AND_SIGN macro
Whether the specified algorithm is a hash-and-sign algorithm. Hash-and-sign algorithms are asymmetric (public-key) signature algorithms structured in two parts: first the calculation of a hash in a way that does not depend on the key, then the calculation of a signature from the hash value and the key. Hash-and-sign algorithms encode the hash used for the hashing step, and you can call #PSA_ALG_SIGN_GET_HASH to extract this algorithm. Thus, for a hash-and-sign algorithm, `psa_sign_message(key, alg, input, ...)` is equivalent to ``` psa_hash_compute(PSA_ALG_SIGN_GET_HASH(alg), input, ..., hash, ...); psa_sign_hash(key, alg, hash, ..., signature, ...); ``` Most usefully, separating the hash from the signature allows the hash to be calculated in multiple steps with psa_hash_setup(), psa_hash_update() and psa_hash_finish(). Likewise psa_verify_message() is equivalent to calculating the hash and then calling psa_verify_hash().
Arguments
alg
An algorithm identifier (value of type #psa_algorithm_t).
Return value
1 if \p alg is a hash-and-sign algorithm, 0 otherwise. This macro may return either 0 or 1 if \p alg is not a supported algorithm identifier.