New function mbedtls_rsa_get_bitlen()
Document, implement and test mbedtls_rsa_get_bitlen(). Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
c3d17cde46
commit
19f1adfc69
5 changed files with 165 additions and 29 deletions
|
@ -1014,6 +1014,14 @@ int mbedtls_rsa_get_md_alg(const mbedtls_rsa_context *ctx)
|
|||
return ctx->hash_id;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get length in bits of RSA modulus
|
||||
*/
|
||||
size_t mbedtls_rsa_get_bitlen(const mbedtls_rsa_context *ctx)
|
||||
{
|
||||
return mbedtls_mpi_bitlen(&ctx->N);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get length in bytes of RSA modulus
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue