mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 22:15:37 +01:00
Don't always recompute context length in mbedtls_rsa_get_len
This commit changes the implementation of `mbedtls_rsa_get_len` to return `ctx->len` instead of always re-computing the modulus' byte-size via `mbedtls_mpi_size`.
This commit is contained in:
parent
54cfc585cd
commit
2f8f06aa25
@ -923,7 +923,7 @@ void mbedtls_rsa_set_padding( mbedtls_rsa_context *ctx, int padding, int hash_id
|
|||||||
|
|
||||||
size_t mbedtls_rsa_get_len( const mbedtls_rsa_context *ctx )
|
size_t mbedtls_rsa_get_len( const mbedtls_rsa_context *ctx )
|
||||||
{
|
{
|
||||||
return( mbedtls_mpi_size( &ctx->N ) );
|
return( ctx->len );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user