<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.14"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Crypto++: ASN1Object Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Crypto++  <span id="projectnumber">7.0</span> </div> <div id="projectbrief">Free C++ class library of cryptographic schemes</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="class_a_s_n1_object-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">ASN1Object Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div> </div><!--header--> <div class="contents"> <p>Interface for encoding and decoding ASN1 objects. <a href="class_a_s_n1_object.html#details">More...</a></p> <div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for ASN1Object:</div> <div id="dynsection-0-summary" class="dynsummary" style="display:block;"> </div> <div id="dynsection-0-content" class="dyncontent" style="display:none;"> <div class="center"> <img src="class_a_s_n1_object.png" usemap="#ASN1Object_map" alt=""/> <map id="ASN1Object_map" name="ASN1Object_map"> <area href="class_a_s_n1_crypto_material.html" title="Encode and decode ASN.1 objects with additional information. " alt="ASN1CryptoMaterial< BASE >" shape="rect" coords="0,56,996,80"/> <area href="class_a_s_n1_crypto_material.html" alt="ASN1CryptoMaterial< DL_GroupParameters< Integer > >" shape="rect" coords="1006,56,2002,80"/> <area href="class_a_s_n1_crypto_material.html" alt="ASN1CryptoMaterial< PrivateKey >" shape="rect" coords="3018,56,4014,80"/> <area href="class_a_s_n1_crypto_material.html" alt="ASN1CryptoMaterial< PublicKey >" shape="rect" coords="5533,56,6529,80"/> <area href="class_integer.html" title="Multiple precision integer with arithmetic operations. " alt="Integer" shape="rect" coords="6539,56,7535,80"/> <area href="class_d_l___group_parameters___integer_based.html" title="Integer-based GroupParameters specialization. " alt="DL_GroupParameters_IntegerBased" shape="rect" coords="1006,112,2002,136"/> <area href="class_p_k_c_s8_private_key.html" title="Encodes and decodesprivateKeyInfo. " alt="PKCS8PrivateKey" shape="rect" coords="3018,112,4014,136"/> <area href="class_e_s_i_g_n_function.html" title="ESIGN trapdoor function using the public key. " alt="ESIGNFunction" shape="rect" coords="5030,112,6026,136"/> <area href="class_x509_public_key.html" title="Encodes and decodes subjectPublicKeyInfo. " alt="X509PublicKey" shape="rect" coords="6036,112,7032,136"/> <area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< DL_GroupPrecomputation_LUC, DL_BasePrecomputation_LUC, DL_GroupParameters_IntegerBased >" shape="rect" coords="2012,168,3008,192"/> <area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< GROUP_PRECOMP, BASE_PRECOMP, DL_GroupParameters_IntegerBased >" shape="rect" coords="2012,224,3008,248"/> <area href="class_d_l___group_parameters_impl.html" alt="DL_GroupParametersImpl< ModExpPrecomputation, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, DL_GroupParameters_IntegerBased >" shape="rect" coords="2012,280,3008,304"/> <area href="class_d_l___key_impl.html" alt="DL_KeyImpl< PKCS8PrivateKey, DL_GroupParameters_EC< EC > >" shape="rect" coords="4024,168,5020,192"/> <area href="class_d_l___key_impl.html" alt="DL_KeyImpl< PKCS8PrivateKey, GP >" shape="rect" coords="4024,224,5020,248"/> <area href="class_invertible_r_s_a_function.html" title="RSA trapdoor function using the private key. " alt="InvertibleRSAFunction" shape="rect" coords="4024,280,5020,304"/> <area href="class_invertible_e_s_i_g_n_function.html" title="ESIGN trapdoor function using the private key. " alt="InvertibleESIGNFunction" shape="rect" coords="5030,168,6026,192"/> <area href="class_d_l___key_impl.html" alt="DL_KeyImpl< X509PublicKey, DL_GroupParameters_EC< EC > >" shape="rect" coords="7042,168,8038,192"/> <area href="class_d_l___key_impl.html" alt="DL_KeyImpl< X509PublicKey, GP >" shape="rect" coords="7042,224,8038,248"/> <area href="class_r_s_a_function.html" title="RSA trapdoor function using the public key. " alt="RSAFunction" shape="rect" coords="7042,280,8038,304"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a430af8c994bc78d996067247fa5a0770"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_s_n1_object.html#a430af8c994bc78d996067247fa5a0770">BERDecode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt)=0</td></tr> <tr class="memdesc:a430af8c994bc78d996067247fa5a0770"><td class="mdescLeft"> </td><td class="mdescRight">Decode this object from a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. <a href="#a430af8c994bc78d996067247fa5a0770">More...</a><br /></td></tr> <tr class="separator:a430af8c994bc78d996067247fa5a0770"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a10e40187a6ba048dfc8a2c8ca5c6c2ec"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_s_n1_object.html#a10e40187a6ba048dfc8a2c8ca5c6c2ec">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const =0</td></tr> <tr class="memdesc:a10e40187a6ba048dfc8a2c8ca5c6c2ec"><td class="mdescLeft"> </td><td class="mdescRight">Encode this object into a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. <a href="#a10e40187a6ba048dfc8a2c8ca5c6c2ec">More...</a><br /></td></tr> <tr class="separator:a10e40187a6ba048dfc8a2c8ca5c6c2ec"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a23d4aa134b80757d98145ecc832b5abb"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_s_n1_object.html#a23d4aa134b80757d98145ecc832b5abb">BEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &bt) const</td></tr> <tr class="memdesc:a23d4aa134b80757d98145ecc832b5abb"><td class="mdescLeft"> </td><td class="mdescRight">Encode this object into a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. <a href="#a23d4aa134b80757d98145ecc832b5abb">More...</a><br /></td></tr> <tr class="separator:a23d4aa134b80757d98145ecc832b5abb"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Interface for encoding and decoding ASN1 objects. </p> <p>Each class that derives from <a class="el" href="class_a_s_n1_object.html" title="Interface for encoding and decoding ASN1 objects. ">ASN1Object</a> should provide a serialization format that controls subobject layout. Most of the time the serialization format is taken from a standard, like P1363 or an RFC. </p> <p class="definition">Definition at line <a class="el" href="cryptlib_8h_source.html#l03112">3112</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a430af8c994bc78d996067247fa5a0770"></a> <h2 class="memtitle"><span class="permalink"><a href="#a430af8c994bc78d996067247fa5a0770">◆ </a></span>BERDecode()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual void ASN1Object::BERDecode </td> <td>(</td> <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> & </td> <td class="paramname"><em>bt</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Decode this object from a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">bt</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object</td></tr> </table> </dd> </dl> <p>Uses Basic Encoding Rules (BER) </p> <p>Implemented in <a class="el" href="class_p_k_c_s8_private_key.html#a9ffab1c1391e4faf356668d8e2cd7d32">PKCS8PrivateKey</a>, <a class="el" href="class_x509_public_key.html#a4eb86b0b55185f10a13ff7e1b083a67b">X509PublicKey</a>, <a class="el" href="class_integer.html#a8736cc41b06596c9c04328d2f0238db7">Integer</a>, <a class="el" href="class_invertible_r_s_a_function.html#a315fea96cb04dc41150d92cf5d1ce3e0">InvertibleRSAFunction</a>, <a class="el" href="class_invertible_e_s_i_g_n_function.html#a7e63d8fe66a25af6611f37bdaac982c4">InvertibleESIGNFunction</a>, <a class="el" href="class_d_l___group_parameters___integer_based.html#a9a13e3dd2da2b154d8296f306e2ee2a9">DL_GroupParameters_IntegerBased</a>, and <a class="el" href="class_e_s_i_g_n_function.html#a6517cb00d59eb584c9ecf86d3dce6742">ESIGNFunction</a>.</p> </div> </div> <a id="a10e40187a6ba048dfc8a2c8ca5c6c2ec"></a> <h2 class="memtitle"><span class="permalink"><a href="#a10e40187a6ba048dfc8a2c8ca5c6c2ec">◆ </a></span>DEREncode()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual void ASN1Object::DEREncode </td> <td>(</td> <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> & </td> <td class="paramname"><em>bt</em></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Encode this object into a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">bt</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object</td></tr> </table> </dd> </dl> <p>Uses Distinguished Encoding Rules (DER) </p> <p>Implemented in <a class="el" href="class_p_k_c_s8_private_key.html#a624cbbbd3906ef3413b9d4c362d6615b">PKCS8PrivateKey</a>, <a class="el" href="class_x509_public_key.html#a3135313b20cea541be900cf67a9eb9c7">X509PublicKey</a>, <a class="el" href="class_integer.html#a0671bd1dbe49e2eecdaaa65ffcb5b6ec">Integer</a>, <a class="el" href="class_invertible_r_s_a_function.html#a45a28a6d7f77b882cbfd0849d6b43869">InvertibleRSAFunction</a>, <a class="el" href="class_invertible_e_s_i_g_n_function.html#a67cceb3b4d3d40b01d89c2053b8b258f">InvertibleESIGNFunction</a>, <a class="el" href="class_d_l___group_parameters___integer_based.html#a4c97b9fade365906546db05ba22b9bc8">DL_GroupParameters_IntegerBased</a>, and <a class="el" href="class_e_s_i_g_n_function.html#a2b93474e204437265a68c8c8a1c910c9">ESIGNFunction</a>.</p> </div> </div> <a id="a23d4aa134b80757d98145ecc832b5abb"></a> <h2 class="memtitle"><span class="permalink"><a href="#a23d4aa134b80757d98145ecc832b5abb">◆ </a></span>BEREncode()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual void ASN1Object::BEREncode </td> <td>(</td> <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> & </td> <td class="paramname"><em>bt</em></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Encode this object into a <a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">bt</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object</td></tr> </table> </dd> </dl> <p>Uses Basic Encoding Rules (BER).</p> <p>This may be useful if <a class="el" href="class_a_s_n1_object.html#a10e40187a6ba048dfc8a2c8ca5c6c2ec" title="Encode this object into a BufferedTransformation. ">DEREncode()</a> would be too inefficient. </p> <p class="definition">Definition at line <a class="el" href="cryptlib_8h_source.html#l03131">3131</a> of file <a class="el" href="cryptlib_8h_source.html">cryptlib.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="cryptlib_8h_source.html">cryptlib.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Sun Sep 16 2018 07:58:13 for Crypto++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.14 </small></address> </body> </html>