📄 randpool_8h-source.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>Crypto++: randpool.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><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="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Compound Members</a> | <a class="qindex" href="globals.html">File Members</a></div><h1>randpool.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_RANDPOOL_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_RANDPOOL_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include "<a class="code" href="cryptlib_8h.html">cryptlib.h</a>"</span>00005 <span class="preprocessor">#include "filters.h"</span>00006 00007 NAMESPACE_BEGIN(CryptoPP)00008 00009 <span class="comment">//! Randomness Pool</span>00010 <span class="comment"></span><span class="comment">/*! This class can be used to generate</span>00011 <span class="comment"> pseudorandom bytes after seeding the pool with</span>00012 <span class="comment"> the Put() methods */</span><a name="l00013"></a><a class="code" href="class_random_pool.html">00013</a> <span class="keyword">class </span>CRYPTOPP_DLL RandomPool : <span class="keyword">public</span> <a class="code" href="class_random_number_generator.html">RandomNumberGenerator</a>,00014 <span class="keyword">public</span> Bufferless<BufferedTransformation>00015 {00016 <span class="keyword">public</span>:<span class="comment"></span>00017 <span class="comment"> //! poolSize must be greater than 16</span>00018 <span class="comment"></span> RandomPool(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> poolSize=384);00019 00020 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Put2(<span class="keyword">const</span> byte *begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00021 <a name="l00022"></a><a class="code" href="class_random_pool.html#_random_poola2">00022</a> <span class="keywordtype">bool</span> AnyRetrievable()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">true</span>;}<a name="l00023"></a><a class="code" href="class_random_pool.html#_random_poola3">00023</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> MaxRetrievable()<span class="keyword"> const </span>{<span class="keywordflow">return</span> ULONG_MAX;}00024 00025 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> TransferTo2(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &target, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> &transferBytes, <span class="keyword">const</span> std::string &channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>);00026 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> CopyRangeTo2(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &target, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> &begin, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> end=ULONG_MAX, <span class="keyword">const</span> std::string &channel=NULL_CHANNEL, <span class="keywordtype">bool</span> blocking=<span class="keyword">true</span>)<span class="keyword"> const</span>00027 <span class="keyword"> </span>{00028 <span class="keywordflow">throw</span> <a class="code" href="class_not_implemented.html">NotImplemented</a>(<span class="stringliteral">"RandomPool: CopyRangeTo2() is not supported by this store"</span>);00029 }00030 00031 byte <a class="code" href="class_random_number_generator.html#_sapphire_r_n_ga2">GenerateByte</a>();00032 <span class="keywordtype">void</span> <a class="code" href="class_random_number_generator.html#_x917_r_n_ga4">GenerateBlock</a>(byte *output, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);00033 00034 <span class="keywordtype">void</span> IsolatedInitialize(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &parameters) {}00035 00036 <span class="keyword">protected</span>:00037 <span class="keywordtype">void</span> Stir();00038 00039 <span class="keyword">private</span>:00040 <a class="code" href="class_sec_block.html">SecByteBlock</a> pool, key;00041 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> addPos, getPos;00042 };00043 00044 NAMESPACE_END00045 00046 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:23 2003 for Crypto++ by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -