1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Merge pull request #7190 from yanrayw/6197_rsa_get_padding_hashID

RSA: provide interface to retrieve padding mode and hash_id
This commit is contained in:
Dave Rodgman
2023-03-20 18:34:53 +00:00
committed by GitHub
5 changed files with 73 additions and 1 deletions

View File

@@ -181,6 +181,28 @@ void mbedtls_rsa_init(mbedtls_rsa_context *ctx);
int mbedtls_rsa_set_padding(mbedtls_rsa_context *ctx, int padding,
mbedtls_md_type_t hash_id);
/**
* \brief This function retrieves padding mode of initialized
* RSA context.
*
* \param ctx The initialized RSA context.
*
* \return RSA padding mode.
*
*/
int mbedtls_rsa_get_padding_mode(const mbedtls_rsa_context *ctx);
/**
* \brief This function retrieves hash identifier of mbedtls_md_type_t
* type.
*
* \param ctx The initialized RSA context.
*
* \return Hash identifier of mbedtls_md_type_t type.
*
*/
int mbedtls_rsa_get_md_alg(const mbedtls_rsa_context *ctx);
/**
* \brief This function imports a set of core parameters into an
* RSA context.