group__hcrypto__rsa.html revision 226031
1226031Sstas<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2226031Sstas<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 3226031Sstas<title>Heimdal crypto library: RSA functions</title> 4226031Sstas<link href="doxygen.css" rel="stylesheet" type="text/css"> 5226031Sstas<link href="tabs.css" rel="stylesheet" type="text/css"> 6226031Sstas</head><body> 7226031Sstas<p> 8226031Sstas<a href="http://www.h5l.org/"><img src="http://www.h5l.org/keyhole-heimdal.png" alt="keyhole logo"/></a> 9226031Sstas</p> 10226031Sstas<!-- end of header marker --> 11226031Sstas<!-- Generated by Doxygen 1.5.6 --> 12226031Sstas<div class="navigation" id="top"> 13226031Sstas <div class="tabs"> 14226031Sstas <ul> 15226031Sstas <li><a href="index.html"><span>Main Page</span></a></li> 16226031Sstas <li><a href="modules.html"><span>Modules</span></a></li> 17226031Sstas <li><a href="examples.html"><span>Examples</span></a></li> 18226031Sstas </ul> 19226031Sstas </div> 20226031Sstas</div> 21226031Sstas<div class="contents"> 22226031Sstas<h1>RSA functions</h1><table border="0" cellpadding="0" cellspacing="0"> 23226031Sstas<tr><td></td></tr> 24226031Sstas<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 25226031Sstas<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> 26226031Sstas 27226031Sstas<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> 28226031Sstas 29226031Sstas<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> 30226031Sstas 31226031Sstas<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> 32226031Sstas 33226031Sstas<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> 34226031Sstas 35226031Sstas<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> 36226031Sstas 37226031Sstas<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> 38226031Sstas 39226031Sstas<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> 40226031Sstas 41226031Sstas</table> 42226031Sstas<hr><a name="_details"></a><h2>Detailed Description</h2> 43226031SstasSee the <a class="el" href="page_rsa.html">RSA - public-key cryptography</a> for description and examples. <hr><h2>Function Documentation</h2> 44226031Sstas<a class="anchor" name="gf0fbfb9641abf52a10e47c789bbba777"></a><!-- doxytag: member="rsa.c::RSA_free" ref="gf0fbfb9641abf52a10e47c789bbba777" args="(RSA *rsa)" --> 45226031Sstas<div class="memitem"> 46226031Sstas<div class="memproto"> 47226031Sstas <table class="memname"> 48226031Sstas <tr> 49226031Sstas <td class="memname">void RSA_free </td> 50226031Sstas <td>(</td> 51226031Sstas <td class="paramtype">RSA * </td> 52226031Sstas <td class="paramname"> <em>rsa</em> </td> 53226031Sstas <td> ) </td> 54226031Sstas <td></td> 55226031Sstas </tr> 56226031Sstas </table> 57226031Sstas</div> 58226031Sstas<div class="memdoc"> 59226031Sstas 60226031Sstas<p> 61226031SstasFree an allocation RSA object.<p> 62226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 63226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 64226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the RSA object to free. </td></tr> 65226031Sstas </table> 66226031Sstas</dl> 67226031Sstas 68226031Sstas</div> 69226031Sstas</div><p> 70226031Sstas<a class="anchor" name="gfcdc9f15c7075cd8434f0c7e59d3db5c"></a><!-- doxytag: member="rsa.c::RSA_get_app_data" ref="gfcdc9f15c7075cd8434f0c7e59d3db5c" args="(const RSA *rsa)" --> 71226031Sstas<div class="memitem"> 72226031Sstas<div class="memproto"> 73226031Sstas <table class="memname"> 74226031Sstas <tr> 75226031Sstas <td class="memname">void* RSA_get_app_data </td> 76226031Sstas <td>(</td> 77226031Sstas <td class="paramtype">const RSA * </td> 78226031Sstas <td class="paramname"> <em>rsa</em> </td> 79226031Sstas <td> ) </td> 80226031Sstas <td></td> 81226031Sstas </tr> 82226031Sstas </table> 83226031Sstas</div> 84226031Sstas<div class="memdoc"> 85226031Sstas 86226031Sstas<p> 87226031SstasGet the application data for the RSA object.<p> 88226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 89226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 90226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the rsa object to get the parameter for</td></tr> 91226031Sstas </table> 92226031Sstas</dl> 93226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>the data object </dd></dl> 94226031Sstas 95226031Sstas</div> 96226031Sstas</div><p> 97226031Sstas<a class="anchor" name="g8a0ab0eaf85ef01f1cc31329558fd37a"></a><!-- doxytag: member="rsa.c::RSA_get_method" ref="g8a0ab0eaf85ef01f1cc31329558fd37a" args="(const RSA *rsa)" --> 98226031Sstas<div class="memitem"> 99226031Sstas<div class="memproto"> 100226031Sstas <table class="memname"> 101226031Sstas <tr> 102226031Sstas <td class="memname">const RSA_METHOD* RSA_get_method </td> 103226031Sstas <td>(</td> 104226031Sstas <td class="paramtype">const RSA * </td> 105226031Sstas <td class="paramname"> <em>rsa</em> </td> 106226031Sstas <td> ) </td> 107226031Sstas <td></td> 108226031Sstas </tr> 109226031Sstas </table> 110226031Sstas</div> 111226031Sstas<div class="memdoc"> 112226031Sstas 113226031Sstas<p> 114226031SstasReturn the RSA_METHOD used for this RSA object.<p> 115226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 116226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 117226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the object to get the method from.</td></tr> 118226031Sstas </table> 119226031Sstas</dl> 120226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>the method used for this RSA object. </dd></dl> 121226031Sstas 122226031Sstas</div> 123226031Sstas</div><p> 124226031Sstas<a class="anchor" name="gc7196620864c48d1d6b8377ad8521a4e"></a><!-- doxytag: member="rsa.c::RSA_new" ref="gc7196620864c48d1d6b8377ad8521a4e" args="(void)" --> 125226031Sstas<div class="memitem"> 126226031Sstas<div class="memproto"> 127226031Sstas <table class="memname"> 128226031Sstas <tr> 129226031Sstas <td class="memname">RSA* RSA_new </td> 130226031Sstas <td>(</td> 131226031Sstas <td class="paramtype">void </td> 132226031Sstas <td class="paramname"> </td> 133226031Sstas <td> ) </td> 134226031Sstas <td></td> 135226031Sstas </tr> 136226031Sstas </table> 137226031Sstas</div> 138226031Sstas<div class="memdoc"> 139226031Sstas 140226031Sstas<p> 141226031SstasSame as <a class="el" href="group__hcrypto__rsa.html#gd184201d41deee1d1d684974ecc44e5c">RSA_new_method()</a> using NULL as engine.<p> 142226031Sstas<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> 143226031Sstas 144226031Sstas</div> 145226031Sstas</div><p> 146226031Sstas<a class="anchor" name="gd184201d41deee1d1d684974ecc44e5c"></a><!-- doxytag: member="rsa.c::RSA_new_method" ref="gd184201d41deee1d1d684974ecc44e5c" args="(ENGINE *engine)" --> 147226031Sstas<div class="memitem"> 148226031Sstas<div class="memproto"> 149226031Sstas <table class="memname"> 150226031Sstas <tr> 151226031Sstas <td class="memname">RSA* RSA_new_method </td> 152226031Sstas <td>(</td> 153226031Sstas <td class="paramtype">ENGINE * </td> 154226031Sstas <td class="paramname"> <em>engine</em> </td> 155226031Sstas <td> ) </td> 156226031Sstas <td></td> 157226031Sstas </tr> 158226031Sstas </table> 159226031Sstas</div> 160226031Sstas<div class="memdoc"> 161226031Sstas 162226031Sstas<p> 163226031SstasAllocate 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> 164226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 165226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 166226031Sstas <tr><td valign="top"></td><td valign="top"><em>engine</em> </td><td>Specific what ENGINE RSA provider should be used.</td></tr> 167226031Sstas </table> 168226031Sstas</dl> 169226031Sstas<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> 170226031Sstas 171226031Sstas</div> 172226031Sstas</div><p> 173226031Sstas<a class="anchor" name="ge2af4ebfadf6a1450b823dfc6ca50687"></a><!-- doxytag: member="rsa.c::RSA_set_app_data" ref="ge2af4ebfadf6a1450b823dfc6ca50687" args="(RSA *rsa, void *arg)" --> 174226031Sstas<div class="memitem"> 175226031Sstas<div class="memproto"> 176226031Sstas <table class="memname"> 177226031Sstas <tr> 178226031Sstas <td class="memname">int RSA_set_app_data </td> 179226031Sstas <td>(</td> 180226031Sstas <td class="paramtype">RSA * </td> 181226031Sstas <td class="paramname"> <em>rsa</em>, </td> 182226031Sstas </tr> 183226031Sstas <tr> 184226031Sstas <td class="paramkey"></td> 185226031Sstas <td></td> 186226031Sstas <td class="paramtype">void * </td> 187226031Sstas <td class="paramname"> <em>arg</em></td><td> </td> 188226031Sstas </tr> 189226031Sstas <tr> 190226031Sstas <td></td> 191226031Sstas <td>)</td> 192226031Sstas <td></td><td></td><td></td> 193226031Sstas </tr> 194226031Sstas </table> 195226031Sstas</div> 196226031Sstas<div class="memdoc"> 197226031Sstas 198226031Sstas<p> 199226031SstasSet the application data for the RSA object.<p> 200226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 201226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 202226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the rsa object to set the parameter for </td></tr> 203226031Sstas <tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>the data object to store</td></tr> 204226031Sstas </table> 205226031Sstas</dl> 206226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 on success. </dd></dl> 207226031Sstas 208226031Sstas</div> 209226031Sstas</div><p> 210226031Sstas<a class="anchor" name="gee6501b3b0fe2917a2e40adce6862395"></a><!-- doxytag: member="rsa.c::RSA_set_method" ref="gee6501b3b0fe2917a2e40adce6862395" args="(RSA *rsa, const RSA_METHOD *method)" --> 211226031Sstas<div class="memitem"> 212226031Sstas<div class="memproto"> 213226031Sstas <table class="memname"> 214226031Sstas <tr> 215226031Sstas <td class="memname">int RSA_set_method </td> 216226031Sstas <td>(</td> 217226031Sstas <td class="paramtype">RSA * </td> 218226031Sstas <td class="paramname"> <em>rsa</em>, </td> 219226031Sstas </tr> 220226031Sstas <tr> 221226031Sstas <td class="paramkey"></td> 222226031Sstas <td></td> 223226031Sstas <td class="paramtype">const RSA_METHOD * </td> 224226031Sstas <td class="paramname"> <em>method</em></td><td> </td> 225226031Sstas </tr> 226226031Sstas <tr> 227226031Sstas <td></td> 228226031Sstas <td>)</td> 229226031Sstas <td></td><td></td><td></td> 230226031Sstas </tr> 231226031Sstas </table> 232226031Sstas</div> 233226031Sstas<div class="memdoc"> 234226031Sstas 235226031Sstas<p> 236226031SstasSet a new method for the RSA keypair.<p> 237226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 238226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 239226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>rsa parameter. </td></tr> 240226031Sstas <tr><td valign="top"></td><td valign="top"><em>method</em> </td><td>the new method for the RSA parameter.</td></tr> 241226031Sstas </table> 242226031Sstas</dl> 243226031Sstas<dl class="return" compact><dt><b>Returns:</b></dt><dd>1 on success. </dd></dl> 244226031Sstas 245226031Sstas</div> 246226031Sstas</div><p> 247226031Sstas<a class="anchor" name="gdb710b16e5e5616f0693801cc60aa943"></a><!-- doxytag: member="rsa.c::RSA_up_ref" ref="gdb710b16e5e5616f0693801cc60aa943" args="(RSA *rsa)" --> 248226031Sstas<div class="memitem"> 249226031Sstas<div class="memproto"> 250226031Sstas <table class="memname"> 251226031Sstas <tr> 252226031Sstas <td class="memname">int RSA_up_ref </td> 253226031Sstas <td>(</td> 254226031Sstas <td class="paramtype">RSA * </td> 255226031Sstas <td class="paramname"> <em>rsa</em> </td> 256226031Sstas <td> ) </td> 257226031Sstas <td></td> 258226031Sstas </tr> 259226031Sstas </table> 260226031Sstas</div> 261226031Sstas<div class="memdoc"> 262226031Sstas 263226031Sstas<p> 264226031SstasAdd 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> 265226031Sstas<dl compact><dt><b>Parameters:</b></dt><dd> 266226031Sstas <table border="0" cellspacing="2" cellpadding="0"> 267226031Sstas <tr><td valign="top"></td><td valign="top"><em>rsa</em> </td><td>the object to add reference counting too.</td></tr> 268226031Sstas </table> 269226031Sstas</dl> 270226031Sstas<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> 271226031Sstas 272226031Sstas</div> 273226031Sstas</div><p> 274226031Sstas</div> 275226031Sstas<hr size="1"><address style="text-align: right;"><small> 276226031SstasGenerated on Sat Jul 30 13:45:37 2011 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> 277226031Sstas</body> 278226031Sstas</html> 279