📄 classpteacypher.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> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PTEACypher Class Reference</h1><code>#include <<a class="el" href="cypher_8h-source.html">cypher.h</a>></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> </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> </td><td valign=bottom><a class="el" href="classPTEACypher.html#a1">PTEACypher</a> (const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &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 </td><td valign=bottom><a class="el" href="classPTEACypher.html#a2">SetKey</a> (const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> &newKey)</td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPTEACypher.html#a3">GetKey</a> (<a class="el" href="structPTEACypher_1_1Key.html">Key</a> &newKey) const</td></tr><tr><td colspan=2><br><h2>Static Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classPTEACypher.html#d0">GenerateKey</a> (<a class="el" href="structPTEACypher_1_1Key.html">Key</a> &newKey)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual void </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 </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 </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 & 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">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPCypher.html#s9">BlockChainMode</a> </td> <td class="mdname1" valign="top" nowrap> <em>chainMode</em> = ElectronicCodebook </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> & </td> <td class="mdname" nowrap> <em>keyData</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="classPCypher.html#s9">BlockChainMode</a> </td> <td class="mdname" nowrap> <em>chainMode</em> = ElectronicCodebook</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">const void * </td> <td class="mdname" nowrap> <em>in</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>out</em></td> </tr> <tr> <td></td> <td class="md">) </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> </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> </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">( </td> <td class="md" nowrap valign="top">const void * </td> <td class="mdname" nowrap> <em>in</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>out</em></td> </tr> <tr> <td></td> <td class="md">) </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> </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> </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">( </td> <td class="md" nowrap valign="top"><a class="el" href="structPTEACypher_1_1Key.html">Key</a> & </td> <td class="mdname1" valign="top" nowrap> <em>newKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top"><a class="el" href="structPTEACypher_1_1Key.html">Key</a> & </td> <td class="mdname1" valign="top" nowrap> <em>newKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">BOOL </td> <td class="mdname1" valign="top" nowrap> <em>encoding</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">const <a class="el" href="structPTEACypher_1_1Key.html">Key</a> & </td> <td class="mdname1" valign="top" nowrap> <em>newKey</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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 + -