mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
rsa.c: provide interface to get padding mode of RSA context
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
@ -499,10 +499,17 @@ int mbedtls_rsa_set_padding(mbedtls_rsa_context *ctx, int padding,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get padding mode of RSA modulus
|
||||
*/
|
||||
int mbedtls_rsa_get_padding_mode(const mbedtls_rsa_context *ctx)
|
||||
{
|
||||
return ctx->MBEDTLS_PRIVATE(padding);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get length in bytes of RSA modulus
|
||||
*/
|
||||
|
||||
size_t mbedtls_rsa_get_len(const mbedtls_rsa_context *ctx)
|
||||
{
|
||||
return ctx->len;
|
||||
|
Reference in New Issue
Block a user