mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 06:44:28 +00:00
rsa.c: provide interface to get hash_id of RSA context
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
a730df6f86
commit
12cb39661c
@ -191,6 +191,17 @@ int mbedtls_rsa_set_padding(mbedtls_rsa_context *ctx, int padding,
|
||||
*/
|
||||
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_hash_id(const mbedtls_rsa_context *ctx);
|
||||
|
||||
/**
|
||||
* \brief This function imports a set of core parameters into an
|
||||
* RSA context.
|
||||
|
@ -507,6 +507,14 @@ int mbedtls_rsa_get_padding_mode(const mbedtls_rsa_context *ctx)
|
||||
return ctx->MBEDTLS_PRIVATE(padding);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get hash identifier of mbedtls_md_type_t type
|
||||
*/
|
||||
int mbedtls_rsa_get_hash_id(const mbedtls_rsa_context *ctx)
|
||||
{
|
||||
return ctx->MBEDTLS_PRIVATE(hash_id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get length in bytes of RSA modulus
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user