
#use wml::openssl-macros area=docs page=RSA_size

<title>Documents, RSA_size(3)</title>

<h1>RSA_size(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#RETURN_VALUE">RETURN VALUE</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
RSA_size - get RSA modulus size

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/rsa.h&gt;
</PRE>
<PRE> int RSA_size(const RSA *rsa);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
This function returns the RSA modulus size in bytes. It can be used to
determine how much memory must be allocated for an RSA encrypted value.

</P>
<P>
<STRONG>rsa-&gt;n</STRONG> must not be <STRONG>NULL</STRONG>.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUE">RETURN VALUE</A></H1>
<P>
The size in bytes.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/rsa.html#">rsa(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>RSA_size()</CODE> is available in all versions of SSLeay and OpenSSL.

</P>
:}


