xref: /optee_os/lib/libmbedtls/mbedtls/library/md_psa.h (revision b0563631928755fe864b97785160fb3088e9efdc)
1*b0563631STom Van Eyck /**
2*b0563631STom Van Eyck  * Translation between MD and PSA identifiers (algorithms, errors).
3*b0563631STom Van Eyck  *
4*b0563631STom Van Eyck  *  Note: this internal module will go away when everything becomes based on
5*b0563631STom Van Eyck  *  PSA Crypto; it is a helper for the transition period.
6*b0563631STom Van Eyck  *
7*b0563631STom Van Eyck  *  Copyright The Mbed TLS Contributors
8*b0563631STom Van Eyck  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9*b0563631STom Van Eyck  */
10*b0563631STom Van Eyck #ifndef MBEDTLS_MD_PSA_H
11*b0563631STom Van Eyck #define MBEDTLS_MD_PSA_H
12*b0563631STom Van Eyck 
13*b0563631STom Van Eyck #include "common.h"
14*b0563631STom Van Eyck 
15*b0563631STom Van Eyck #include "mbedtls/md.h"
16*b0563631STom Van Eyck #include "psa/crypto.h"
17*b0563631STom Van Eyck 
18*b0563631STom Van Eyck /** Convert PSA status to MD error code.
19*b0563631STom Van Eyck  *
20*b0563631STom Van Eyck  * \param status    PSA status.
21*b0563631STom Van Eyck  *
22*b0563631STom Van Eyck  * \return          The corresponding MD error code,
23*b0563631STom Van Eyck  */
24*b0563631STom Van Eyck int mbedtls_md_error_from_psa(psa_status_t status);
25*b0563631STom Van Eyck 
26*b0563631STom Van Eyck #endif /* MBEDTLS_MD_PSA_H */
27