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

📄 algorithm_8h-source.html

📁 LINUX下发送邮件的库,测试很好用,有各种发送测试的例子
💻 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>algorithm.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</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; </center>
<hr><h1>algorithm.h</h1><div class="fragment"><pre>00001 <font class="comment">/*************************************************************************</font>
00002 <font class="comment"> *                                                                       *</font>
00003 <font class="comment"> * This program is free software; you can redistribute it and/or modify  *</font>
00004 <font class="comment"> * it under the terms of the GNU General Public License as published by  *</font>
00005 <font class="comment"> * the Free Software Foundation; either version 2 of the License, or     *</font>
00006 <font class="comment"> * (at your option) any later version.                                   *</font>
00007 <font class="comment"> *                                                                       *</font>
00008 <font class="comment"> *************************************************************************/</font>
00009 
00010 <font class="preprocessor">#ifndef _ALGORITHM_H__</font>
00011 <font class="preprocessor"></font><font class="preprocessor">#define _ALGORITHM_H__</font>
00012 <font class="preprocessor"></font>
00013 <font class="preprocessor">#include "global.h"</font>
00014 <font class="preprocessor">#include "exception.h"</font>
00015 <font class="preprocessor">#include "i18n.h"</font>
00016 <font class="preprocessor">#include &lt;strings.h&gt;</font>
00017 <font class="preprocessor">#include &lt;unistd.h&gt;</font>
00018 <font class="preprocessor">#include &lt;arpa/inet.h&gt;</font>
00019 <font class="preprocessor">#include &lt;netdb.h&gt;</font>
00020 <font class="preprocessor">#include &lt;sys/socket.h&gt;</font>
00021 <font class="preprocessor">#include &lt;netinet/in.h&gt;</font>
00022 <font class="preprocessor">#include &lt;errno.h&gt;</font>
00023 <font class="preprocessor">#include &lt;string&gt;</font>
00024 <font class="preprocessor">#include &lt;map&gt;</font>
00025 <font class="preprocessor">#include &lt;algorithm&gt;</font>
00026 <font class="preprocessor">#include &lt;vector&gt;</font>
00027 <font class="preprocessor">#include &lt;openssl/md5.h&gt;</font>
00028 <font class="preprocessor">#include &lt;openssl/sha.h&gt;</font>
00029 <font class="preprocessor">#include &lt;openssl/hmac.h&gt;</font>
00030 
00031 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00032 
<a name="l00039"></a><a class="code" href="classAlgorithm.html">00039</a> <font class="keyword">class </font><a class="code" href="classAlgorithm.html">Algorithm</a>
00040 {
00041         <font class="keyword">public</font>:
00042 
00043                 <font class="keyword">enum</font> CODEC { BASE64, BASE64_NIL };
00044 
00052                 <font class="keyword">static</font> string <a class="code" href="classAlgorithm.html#d0">encode</a> (<font class="keyword">const</font> string &amp;str, CODEC codec);
00053 
00064                 <font class="keyword">static</font> string <a class="code" href="classAlgorithm.html#d1">decode</a> (<font class="keyword">const</font> string &amp;str, CODEC codec);
00065 
00075                 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classAlgorithm.html#d2">hmac_md5</a>
00076                                                 (
00077                                                         <font class="keyword">const</font> string &amp;text,
00078                                                         <font class="keyword">const</font> string &amp;key,
00079                                                         <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> * digest
00080                                                 );
00081 
00092                 <font class="keyword">static</font> string <a class="code" href="classAlgorithm.html#d3">hmac_md5_str</a>
00093                                                 (
00094                                                         <font class="keyword">const</font> string &amp;str,
00095                                                         <font class="keyword">const</font> string &amp;key
00096                                                 );
00097 
00107                 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classAlgorithm.html#d4">hmac_sha1</a>
00108                                                 ( 
00109                                                         <font class="keyword">const</font> string &amp;text, 
00110                                                         <font class="keyword">const</font> string &amp;key, 
00111                                                         <font class="keywordtype">unsigned</font> <font class="keywordtype">char</font> * digest 
00112                                                 );
00113 
00124                 <font class="keyword">static</font> string <a class="code" href="classAlgorithm.html#d5">hmac_sha1_str</a> (<font class="keyword">const</font> string &amp;str, <font class="keyword">const</font> string &amp;key);
00125 
00126         <font class="keyword">protected</font>:
00127 
00131                 <font class="keyword">static</font> <font class="keywordtype">char</font> <a class="code" href="classAlgorithm.html#q0">tbl_base64</a>[];
00132 
00141                 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classAlgorithm.html#e0">enc_base64</a> (<font class="keyword">const</font> string &amp;orig_str, string * enc_str);
00142 
00155                 <font class="keyword">static</font> <font class="keywordtype">int</font> <a class="code" href="classAlgorithm.html#e1">dec_base64</a> (<font class="keyword">const</font> string &amp;enc_str, string * orig_str);
00156 
00172                 <font class="keyword">static</font> <font class="keywordtype">int</font> <a class="code" href="classAlgorithm.html#e2">dec_base64_nil</a> (<font class="keyword">const</font> string &amp;enc_str, string * orig_str);
00173 
00183                 <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="classAlgorithm.html#e3">enc_base64_nil</a> (string orig_str, string * enc_str);
00184 };
00185 
00186 <font class="preprocessor">#endif</font>
00187 <font class="preprocessor"></font>
</pre></div><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 + -