📄 classalgorithm.html
字号:
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> string Algorithm::encode </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>str</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>CODEC </td>
<td class="mdname" nowrap> <em>codec</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Encode str with the given codec.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>str</em> </td><td>
The string that should be encoded. </td></tr>
<tr><td valign=top><em>codec</em> </td><td>
The codec that should be used. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
The encoded string. </dl> </td>
</tr>
</table>
<a name="d2" doxytag="Algorithm::hmac_md5"></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 Algorithm::hmac_md5 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>text</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>digest</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calculates the keyed md5sum. (rfc2104)<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>text</em> </td><td>
The text that should be checksummed. </td></tr>
<tr><td valign=top><em>key</em> </td><td>
The key that should be used. </td></tr>
<tr><td valign=top><em>digest</em> </td><td>
The checksum that is calculated out of key and text will be stored at digest. digest needs to be at least 16 Bytes big. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="d3" doxytag="Algorithm::hmac_md5_str"></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"> string Algorithm::hmac_md5_str </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>str</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>key</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calculates the keyed md5sum and returns the digest as a string. (rfc2104) Just for your convenience.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>str</em> </td><td>
The text that should be checksummed. </td></tr>
<tr><td valign=top><em>key</em> </td><td>
The key that should be used. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
A string representation of the checksum that was calculated using str and key. </dl> </td>
</tr>
</table>
<a name="d4" doxytag="Algorithm::hmac_sha1"></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 Algorithm::hmac_sha1 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>text</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>key</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>unsigned char * </td>
<td class="mdname" nowrap> <em>digest</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calculates the keyed sha1sum. (rfc2104)<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>text</em> </td><td>
The text that should be checksummed. </td></tr>
<tr><td valign=top><em>key</em> </td><td>
The key that should be used. </td></tr>
<tr><td valign=top><em>digest</em> </td><td>
The checksum that is calculated out of key and text will be stored at digest. digest needs to be at least 20 Bytes big. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="d5" doxytag="Algorithm::hmac_sha1_str"></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"> string Algorithm::hmac_sha1_str </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>str</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>key</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calculates the keyed sha1sum and returns the digest as a string. (rfc2104) Just for your convenience.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>str</em> </td><td>
The text that should be checksummed. </td></tr>
<tr><td valign=top><em>key</em> </td><td>
The key that should be used. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
A string representation of the checksum that was calculated using str and key. </dl> </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="q0" doxytag="Algorithm::tbl_base64"></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"> char Algorithm::tbl_base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"<code> [static, protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The base64 character table. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="algorithm_8h-source.html">algorithm.h</a><li>algorithm.cpp</ul>
<hr><address align="right"><small>Generated on Tue Jan 28 17:09:58 2003 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.15 </small></address>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -