⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classpteacypher.html

📁 pwlib开发文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PTEACypher class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>PTEACypher Class Reference</h1><code>#include &lt;<a class="el" href="cypher_8h-source.html">cypher.h</a>&gt;</code><p><p>Inheritance diagram for PTEACypher:<p><center><img src="classPTEACypher.png" usemap="#PTEACypher_map" border="0" alt=""></center><map name="PTEACypher_map"><area href="classPCypher.html" alt="PCypher" shape="rect" coords="0,56,86,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,86,24"></map><a href="classPTEACypher-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#a0">PTEACypher</a> (<a class="el" href="classPCypher.html#s9">BlockChainMode</a> <a class="el" href="classPCypher.html#n2">chainMode</a>=ElectronicCodebook)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#a1">PTEACypher</a> (const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;keyData, <a class="el" href="classPCypher.html#s9">BlockChainMode</a> <a class="el" href="classPCypher.html#n2">chainMode</a>=ElectronicCodebook)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#a2">SetKey</a> (const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;newKey)</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#a3">GetKey</a> (<a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;newKey) const</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#d0">GenerateKey</a> (<a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;newKey)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#b0">Initialise</a> (BOOL encoding)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#b1">EncodeBlock</a> (const void *in, void *out)</td></tr><tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classPTEACypher.html#b2">DecodeBlock</a> (const void *in, void *out)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Tiny Encryption Algorithm. This class implements the Tiny Encryption Algorithm by David Wheeler and Roger Needham at Cambridge University.<p>This is a simple algorithm using a 128 bit binary key and encrypts data in 64 bit blocks. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="PTEACypher::PTEACypher"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PTEACypher::PTEACypher </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPCypher.html#s9">BlockChainMode</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>chainMode</em> = ElectronicCodebook          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Create a new TEA encryption object instance. The parameterless version automatically generates a new, random, key. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>chainMode</em>&nbsp;</td><td>Block chain mode </td></tr></table></dl>    </td>  </tr></table><a name="a1" doxytag="PTEACypher::PTEACypher"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PTEACypher::PTEACypher </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>keyData</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPCypher.html#s9">BlockChainMode</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>chainMode</em> = ElectronicCodebook</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>chainMode</em>&nbsp;</td><td><a class="el" href="structPTEACypher_1_1Key.html">Key</a> for the encryption/decryption algorithm. Block chain mode </td></tr></table></dl>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="b2" doxytag="PTEACypher::DecodeBlock"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PTEACypher::DecodeBlock </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>in</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>out</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Decode an n bit block of memory according to the encryption algorithm. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>out</em>&nbsp;</td><td>Pointer to coded n bit block. Pointer to clear n bit block. </td></tr></table></dl><p>Implements <a class="el" href="classPCypher.html#b4">PCypher</a>.    </td>  </tr></table><a name="b1" doxytag="PTEACypher::EncodeBlock"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PTEACypher::EncodeBlock </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>in</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>out</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Encode an n bit block of memory according to the encryption algorithm. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>out</em>&nbsp;</td><td>Pointer to clear n bit block. Pointer to coded n bit block. </td></tr></table></dl><p>Implements <a class="el" href="classPCypher.html#b3">PCypher</a>.    </td>  </tr></table><a name="d0" doxytag="PTEACypher::GenerateKey"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void PTEACypher::GenerateKey </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>newKey</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Generate a new key suitable for use for encryption using random data. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>newKey</em>&nbsp;</td><td>Variable to take the newly generated key. </td></tr></table></dl>    </td>  </tr></table><a name="a3" doxytag="PTEACypher::GetKey"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void PTEACypher::GetKey </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>newKey</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the key used by this encryption method. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>newKey</em>&nbsp;</td><td>Variable to take the key used by cypher. </td></tr></table></dl>    </td>  </tr></table><a name="b0" doxytag="PTEACypher::Initialise"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PTEACypher::Initialise </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">BOOL&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>encoding</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [protected, virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Initialise the encoding/decoding sequence. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>encoding</em>&nbsp;</td><td>Flag for encoding/decoding sequence about to start. </td></tr></table></dl><p>Implements <a class="el" href="classPCypher.html#b2">PCypher</a>.    </td>  </tr></table><a name="a2" doxytag="PTEACypher::SetKey"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void PTEACypher::SetKey </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>newKey</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the key used by this encryption method. <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>newKey</em>&nbsp;</td><td>Variable to take the key used by cypher. </td></tr></table></dl>    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="cypher_8h-source.html">cypher.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:20 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -