group__hcrypto__rsa.html revision 285830
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3<title>Heimdal crypto library: RSA functions</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<p> 8<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9</p> 10<!-- end of header marker --> 11<!-- Generated by Doxygen 1.5.6 --> 12<div class="navigation" id="top"> 13 <div class="tabs"> 14 <ul> 15 <li><a href="index.html"><span>Main Page</span></a></li> 16 <li><a href="modules.html"><span>Modules</span></a></li> 17 <li><a href="examples.html"><span>Examples</span></a></li> 18 </ul> 19 </div> 20</div> 21<div class="contents"> 22<h1>RSA functions</h1><table border="0" cellpadding="0" cellspacing="0"> 23<tr><td></td></tr> 24<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 25<tr><td class="memItemLeft" nowrap align="right" valign="top">RSA * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gc7196620864c48d1d6b8377ad8521a4e">RSA_new</a> (void)</td></tr> 26 27<tr><td class="memItemLeft" nowrap align="right" valign="top">RSA * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gd184201d41deee1d1d684974ecc44e5c">RSA_new_method</a> (ENGINE *engine)</td></tr> 28 29<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gf0fbfb9641abf52a10e47c789bbba777">RSA_free</a> (RSA *rsa)</td></tr> 30 31<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gdb710b16e5e5616f0693801cc60aa943">RSA_up_ref</a> (RSA *rsa)</td></tr> 32 33<tr><td class="memItemLeft" nowrap align="right" valign="top">const RSA_METHOD * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#g8a0ab0eaf85ef01f1cc31329558fd37a">RSA_get_method</a> (const RSA *rsa)</td></tr> 34 35<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gee6501b3b0fe2917a2e40adce6862395">RSA_set_method</a> (RSA *rsa, const RSA_METHOD *method)</td></tr> 36 37<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#ge2af4ebfadf6a1450b823dfc6ca50687">RSA_set_app_data</a> (RSA *rsa, void *arg)</td></tr> 38 39<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hcrypto__rsa.html#gfcdc9f15c7075cd8434f0c7e59d3db5c">RSA_get_app_data</a> (const RSA *rsa)</td></tr> 40 41</table> 42<hr><a name="_details"></a><h2>Detailed Description</h2> 43See the <a class="el" href="page_rsa.html">RSA - public-key cryptography</a> for description and examples. <hr><h2>Function Documentation</h2> 44<a class="anchor" name="gf0fbfb9641abf52a10e47c789bbba777"></a><!-- doxytag: member="rsa.c::RSA_free" ref="gf0fbfb9641abf52a10e47c789bbba777" args="(RSA *rsa)" --> 45<div class="memitem"> 46<div class="memproto"> 47 <table class="memname"> 48 <tr> 49 <td class="memname">void RSA_free </td> 50 <td>(</td> 51 <td class="paramtype">RSA * </td> 52 <td class="paramname"> <em>rsa</em> </td> 53 <td> ) </td> 54 <td></td> 55 </tr> 56 </table> 57</div> 58<div class="memdoc"> 59 60<p> 61Free an allocation RSA object.<p> 62<dl compact><dt><b>Parameters:</b></dt><dd> 63 <table border="0" cellspacing="2" cellpadding="0"> 64 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the RSA object to free. </td></tr> 65 </table> 66</dl> 67 68</div> 69</div><p> 70<a class="anchor" name="gfcdc9f15c7075cd8434f0c7e59d3db5c"></a><!-- doxytag: member="rsa.c::RSA_get_app_data" ref="gfcdc9f15c7075cd8434f0c7e59d3db5c" args="(const RSA *rsa)" --> 71<div class="memitem"> 72<div class="memproto"> 73 <table class="memname"> 74 <tr> 75 <td class="memname">void* RSA_get_app_data </td> 76 <td>(</td> 77 <td class="paramtype">const RSA * </td> 78 <td class="paramname"> <em>rsa</em> </td> 79 <td> ) </td> 80 <td></td> 81 </tr> 82 </table> 83</div> 84<div class="memdoc"> 85 86<p> 87Get the application data for the RSA object.<p> 88<dl compact><dt><b>Parameters:</b></dt><dd> 89 <table border="0" cellspacing="2" cellpadding="0"> 90 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the rsa object to get the parameter for</td></tr> 91 </table> 92</dl> 93<dl class="return" compact><dt><b>Returns:</b></dt><dd>the data object </dd></dl> 94 95</div> 96</div><p> 97<a class="anchor" name="g8a0ab0eaf85ef01f1cc31329558fd37a"></a><!-- doxytag: member="rsa.c::RSA_get_method" ref="g8a0ab0eaf85ef01f1cc31329558fd37a" args="(const RSA *rsa)" --> 98<div class="memitem"> 99<div class="memproto"> 100 <table class="memname"> 101 <tr> 102 <td class="memname">const RSA_METHOD* RSA_get_method </td> 103 <td>(</td> 104 <td class="paramtype">const RSA * </td> 105 <td class="paramname"> <em>rsa</em> </td> 106 <td> ) </td> 107 <td></td> 108 </tr> 109 </table> 110</div> 111<div class="memdoc"> 112 113<p> 114Return the RSA_METHOD used for this RSA object.<p> 115<dl compact><dt><b>Parameters:</b></dt><dd> 116 <table border="0" cellspacing="2" cellpadding="0"> 117 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the object to get the method from.</td></tr> 118 </table> 119</dl> 120<dl class="return" compact><dt><b>Returns:</b></dt><dd>the method used for this RSA object. </dd></dl> 121 122</div> 123</div><p> 124<a class="anchor" name="gc7196620864c48d1d6b8377ad8521a4e"></a><!-- doxytag: member="rsa.c::RSA_new" ref="gc7196620864c48d1d6b8377ad8521a4e" args="(void)" --> 125<div class="memitem"> 126<div class="memproto"> 127 <table class="memname"> 128 <tr> 129 <td class="memname">RSA* RSA_new </td> 130 <td>(</td> 131 <td class="paramtype">void </td> 132 <td class="paramname"> </td> 133 <td> ) </td> 134 <td></td> 135 </tr> 136 </table> 137</div> 138<div class="memdoc"> 139 140<p> 141Same as <a class="el" href="group__hcrypto__rsa.html#gd184201d41deee1d1d684974ecc44e5c">RSA_new_method()</a> using NULL as engine.<p> 142<dl class="return" compact><dt><b>Returns:</b></dt><dd>a newly allocated RSA object. Free with <a class="el" href="group__hcrypto__rsa.html#gf0fbfb9641abf52a10e47c789bbba777">RSA_free()</a>. </dd></dl> 143 144</div> 145</div><p> 146<a class="anchor" name="gd184201d41deee1d1d684974ecc44e5c"></a><!-- doxytag: member="rsa.c::RSA_new_method" ref="gd184201d41deee1d1d684974ecc44e5c" args="(ENGINE *engine)" --> 147<div class="memitem"> 148<div class="memproto"> 149 <table class="memname"> 150 <tr> 151 <td class="memname">RSA* RSA_new_method </td> 152 <td>(</td> 153 <td class="paramtype">ENGINE * </td> 154 <td class="paramname"> <em>engine</em> </td> 155 <td> ) </td> 156 <td></td> 157 </tr> 158 </table> 159</div> 160<div class="memdoc"> 161 162<p> 163Allocate a new RSA object using the engine, if NULL is specified as the engine, use the default RSA engine as returned by ENGINE_get_default_RSA().<p> 164<dl compact><dt><b>Parameters:</b></dt><dd> 165 <table border="0" cellspacing="2" cellpadding="0"> 166 <tr><td valign="top"></td><td valign="top"><em>engine</em> </td><td>Specific what ENGINE RSA provider should be used.</td></tr> 167 </table> 168</dl> 169<dl class="return" compact><dt><b>Returns:</b></dt><dd>a newly allocated RSA object. Free with <a class="el" href="group__hcrypto__rsa.html#gf0fbfb9641abf52a10e47c789bbba777">RSA_free()</a>. </dd></dl> 170 171</div> 172</div><p> 173<a class="anchor" name="ge2af4ebfadf6a1450b823dfc6ca50687"></a><!-- doxytag: member="rsa.c::RSA_set_app_data" ref="ge2af4ebfadf6a1450b823dfc6ca50687" args="(RSA *rsa, void *arg)" --> 174<div class="memitem"> 175<div class="memproto"> 176 <table class="memname"> 177 <tr> 178 <td class="memname">int RSA_set_app_data </td> 179 <td>(</td> 180 <td class="paramtype">RSA * </td> 181 <td class="paramname"> <em>rsa</em>, </td> 182 </tr> 183 <tr> 184 <td class="paramkey"></td> 185 <td></td> 186 <td class="paramtype">void * </td> 187 <td class="paramname"> <em>arg</em></td><td> </td> 188 </tr> 189 <tr> 190 <td></td> 191 <td>)</td> 192 <td></td><td></td><td></td> 193 </tr> 194 </table> 195</div> 196<div class="memdoc"> 197 198<p> 199Set the application data for the RSA object.<p> 200<dl compact><dt><b>Parameters:</b></dt><dd> 201 <table border="0" cellspacing="2" cellpadding="0"> 202 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the rsa object to set the parameter for </td></tr> 203 <tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>the data object to store</td></tr> 204 </table> 205</dl> 206<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 on success. </dd></dl> 207 208</div> 209</div><p> 210<a class="anchor" name="gee6501b3b0fe2917a2e40adce6862395"></a><!-- doxytag: member="rsa.c::RSA_set_method" ref="gee6501b3b0fe2917a2e40adce6862395" args="(RSA *rsa, const RSA_METHOD *method)" --> 211<div class="memitem"> 212<div class="memproto"> 213 <table class="memname"> 214 <tr> 215 <td class="memname">int RSA_set_method </td> 216 <td>(</td> 217 <td class="paramtype">RSA * </td> 218 <td class="paramname"> <em>rsa</em>, </td> 219 </tr> 220 <tr> 221 <td class="paramkey"></td> 222 <td></td> 223 <td class="paramtype">const RSA_METHOD * </td> 224 <td class="paramname"> <em>method</em></td><td> </td> 225 </tr> 226 <tr> 227 <td></td> 228 <td>)</td> 229 <td></td><td></td><td></td> 230 </tr> 231 </table> 232</div> 233<div class="memdoc"> 234 235<p> 236Set a new method for the RSA keypair.<p> 237<dl compact><dt><b>Parameters:</b></dt><dd> 238 <table border="0" cellspacing="2" cellpadding="0"> 239 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>rsa parameter. </td></tr> 240 <tr><td valign="top"></td><td valign="top"><em>method</em> </td><td>the new method for the RSA parameter.</td></tr> 241 </table> 242</dl> 243<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 on success. </dd></dl> 244 245</div> 246</div><p> 247<a class="anchor" name="gdb710b16e5e5616f0693801cc60aa943"></a><!-- doxytag: member="rsa.c::RSA_up_ref" ref="gdb710b16e5e5616f0693801cc60aa943" args="(RSA *rsa)" --> 248<div class="memitem"> 249<div class="memproto"> 250 <table class="memname"> 251 <tr> 252 <td class="memname">int RSA_up_ref </td> 253 <td>(</td> 254 <td class="paramtype">RSA * </td> 255 <td class="paramname"> <em>rsa</em> </td> 256 <td> ) </td> 257 <td></td> 258 </tr> 259 </table> 260</div> 261<div class="memdoc"> 262 263<p> 264Add an extra reference to the RSA object. The object should be free with <a class="el" href="group__hcrypto__rsa.html#gf0fbfb9641abf52a10e47c789bbba777">RSA_free()</a> to drop the reference.<p> 265<dl compact><dt><b>Parameters:</b></dt><dd> 266 <table border="0" cellspacing="2" cellpadding="0"> 267 <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the object to add reference counting too.</td></tr> 268 </table> 269</dl> 270<dl class="return" compact><dt><b>Returns:</b></dt><dd>the current reference count, can't safely be used except for debug printing. </dd></dl> 271 272</div> 273</div><p> 274</div> 275<hr size="1"><address style="text-align: right;"><small> 276Generated on Wed Jan 11 14:07:38 2012 for Heimdal crypto library by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address> 277</body> 278</html> 279