📄 basecode_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++: basecode.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>basecode.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_BASECODE_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_BASECODE_H</span>00003 <span class="preprocessor"></span>00004 <span class="preprocessor">#include "filters.h"</span>00005 <span class="preprocessor">#include "algparam.h"</span>00006 00007 NAMESPACE_BEGIN(CryptoPP)00008 00009 <span class="keyword">class </span>CRYPTOPP_DLL BaseN_Encoder : <span class="keyword">public</span> Unflushable<Filter>00010 {00011 <span class="keyword">public</span>:00012 BaseN_Encoder(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL)00013 : Unflushable<<a class="code" href="class_filter.html">Filter</a>>(attachment) {}00014 00015 BaseN_Encoder(<span class="keyword">const</span> byte *alphabet, <span class="keywordtype">int</span> log2base, <a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL, <span class="keywordtype">int</span> padding=-1)00016 : Unflushable<<a class="code" href="class_filter.html">Filter</a>>(attachment)00017 {00018 IsolatedInitialize(MakeParameters(<span class="stringliteral">"EncodingLookupArray"</span>, alphabet)00019 (<span class="stringliteral">"Log2Base"</span>, log2base)00020 (<span class="stringliteral">"Pad"</span>, padding != -1)00021 (<span class="stringliteral">"PaddingByte"</span>, byte(padding)));00022 }00023 00024 <span class="keywordtype">void</span> IsolatedInitialize(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &parameters);00025 <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> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00026 00027 <span class="keyword">private</span>:00028 <span class="keyword">const</span> byte *m_alphabet;00029 <span class="keywordtype">int</span> m_padding, m_bitsPerChar, m_outputBlockSize;00030 <span class="keywordtype">int</span> m_bytePos, m_bitPos;00031 <a class="code" href="class_sec_block.html">SecByteBlock</a> m_outBuf;00032 };00033 00034 <span class="keyword">class </span>CRYPTOPP_DLL BaseN_Decoder : <span class="keyword">public</span> Unflushable<Filter>00035 {00036 <span class="keyword">public</span>:00037 BaseN_Decoder(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL)00038 : Unflushable<<a class="code" href="class_filter.html">Filter</a>>(attachment) {}00039 00040 BaseN_Decoder(<span class="keyword">const</span> <span class="keywordtype">int</span> *lookup, <span class="keywordtype">int</span> log2base, <a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL)00041 : Unflushable<<a class="code" href="class_filter.html">Filter</a>>(attachment)00042 {00043 IsolatedInitialize(MakeParameters(<span class="stringliteral">"DecodingLookupArray"</span>, lookup)(<span class="stringliteral">"Log2Base"</span>, log2base));00044 }00045 00046 <span class="keywordtype">void</span> IsolatedInitialize(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &parameters);00047 <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> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00048 00049 <span class="keyword">static</span> <span class="keywordtype">void</span> InitializeDecodingLookupArray(<span class="keywordtype">int</span> *lookup, <span class="keyword">const</span> byte *alphabet, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> log2base, <span class="keywordtype">bool</span> caseInsensitive);00050 00051 <span class="keyword">private</span>:00052 <span class="keyword">const</span> <span class="keywordtype">int</span> *m_lookup;00053 <span class="keywordtype">int</span> m_padding, m_bitsPerChar, m_outputBlockSize;00054 <span class="keywordtype">int</span> m_bytePos, m_bitPos;00055 <a class="code" href="class_sec_block.html">SecByteBlock</a> m_outBuf;00056 };00057 00058 <span class="keyword">class </span>CRYPTOPP_DLL Grouper : <span class="keyword">public</span> Bufferless<Filter>00059 {00060 <span class="keyword">public</span>:00061 Grouper(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL)00062 : Bufferless<<a class="code" href="class_filter.html">Filter</a>>(attachment) {}00063 00064 Grouper(<span class="keywordtype">int</span> groupSize, <span class="keyword">const</span> std::string &seperator, <span class="keyword">const</span> std::string &terminator, <a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> *attachment=NULL)00065 : Bufferless<<a class="code" href="class_filter.html">Filter</a>>(attachment)00066 {00067 IsolatedInitialize(MakeParameters(<span class="stringliteral">"GroupSize"</span>, groupSize)00068 (<span class="stringliteral">"Seperator"</span>, <a class="code" href="class_const_byte_array_parameter.html">ConstByteArrayParameter</a>(seperator))00069 (<span class="stringliteral">"Terminator"</span>, <a class="code" href="class_const_byte_array_parameter.html">ConstByteArrayParameter</a>(terminator)));00070 }00071 00072 <span class="keywordtype">void</span> IsolatedInitialize(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html">NameValuePairs</a> &parameters);00073 <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> length, <span class="keywordtype">int</span> messageEnd, <span class="keywordtype">bool</span> blocking);00074 00075 <span class="keyword">private</span>:00076 <a class="code" href="class_sec_block.html">SecByteBlock</a> m_seperator, m_terminator;00077 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_groupSize, m_counter;00078 };00079 00080 NAMESPACE_END00081 00082 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:09 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 + -