fips140_8h-source.html

来自「Crypto++是一个非常强大的密码学库,主要是功能全」· HTML 代码 · 共 64 行

HTML
64
字号
<!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++: fips140.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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>fips140.h</h1><a href="fips140_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_FIPS140_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_FIPS140_H</span>00003 <span class="preprocessor"></span><span class="comment"></span>00004 <span class="comment">/*! \file</span>00005 <span class="comment">        FIPS-140 related functions and classes.</span>00006 <span class="comment">*/</span>00007 00008 <span class="preprocessor">#include "<a class="code" href="cryptlib_8h.html">cryptlib.h</a>"</span>00009 00010 NAMESPACE_BEGIN(CryptoPP)00011 00012 <span class="comment">//! exception thrown when a crypto algorithm is used after a self test fails</span><a name="l00013"></a><a class="code" href="class_self_test_failure.html">00013</a> <span class="comment"></span><span class="keyword">class </span>CRYPTOPP_DLL SelfTestFailure : <span class="keyword">public</span> <a class="code" href="class_exception.html">Exception</a>00014 {00015 <span class="keyword">public</span>:00016         <span class="keyword">explicit</span> SelfTestFailure(<span class="keyword">const</span> std::string &amp;s) : <a class="code" href="class_exception.html">Exception</a>(OTHER_ERROR, s) {}00017 };00018 <span class="comment"></span>00019 <span class="comment">//! returns whether FIPS-140-2 compliance features were enabled at compile time</span>00020 <span class="comment"></span>CRYPTOPP_DLL <span class="keywordtype">bool</span> FIPS_140_2_ComplianceEnabled();00021 <span class="comment"></span>00022 <span class="comment">//! enum values representing status of the power-up self test</span><a name="l00023"></a><a class="code" href="fips140_8h.html#a14">00023</a> <span class="comment"></span><span class="keyword">enum</span> <a class="code" href="fips140_8h.html#a14">PowerUpSelfTestStatus</a> {POWER_UP_SELF_TEST_NOT_DONE, POWER_UP_SELF_TEST_FAILED, POWER_UP_SELF_TEST_PASSED};00024 <span class="comment"></span>00025 <span class="comment">//! perform the power-up self test, and set the self test status</span>00026 <span class="comment"></span>CRYPTOPP_DLL <span class="keywordtype">void</span> DoPowerUpSelfTest(<span class="keyword">const</span> <span class="keywordtype">char</span> *moduleFilename, <span class="keyword">const</span> byte *expectedModuleMac);00027 <span class="comment"></span>00028 <span class="comment">//! set the power-up self test status to POWER_UP_SELF_TEST_FAILED</span>00029 <span class="comment"></span>CRYPTOPP_DLL <span class="keywordtype">void</span> SimulatePowerUpSelfTestFailure();00030 <span class="comment"></span>00031 <span class="comment">//! return the current power-up self test status</span>00032 <span class="comment"></span>CRYPTOPP_DLL <a class="code" href="fips140_8h.html#a14">PowerUpSelfTestStatus</a> CRYPTOPP_API GetPowerUpSelfTestStatus();00033 00034 <span class="keyword">typedef</span> <a class="code" href="fips140_8h.html#a14">PowerUpSelfTestStatus</a> (CRYPTOPP_API * PGetPowerUpSelfTestStatus)();00035 00036 CRYPTOPP_DLL <span class="keyword">const</span> byte * CRYPTOPP_API GetActualMacAndLocation(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;macSize, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;fileLocation);00037 00038 <span class="keyword">typedef</span> <span class="keyword">const</span> byte * (CRYPTOPP_API * PGetActualMacAndLocation)(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;macSize, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &amp;fileLocation);00039 00040 <span class="comment">// this is used by Algorithm constructor to allow Algorithm objects to be constructed for the self test</span>00041 <span class="keywordtype">bool</span> PowerUpSelfTestInProgressOnThisThread();00042 00043 <span class="keywordtype">void</span> SetPowerUpSelfTestInProgressOnThisThread(<span class="keywordtype">bool</span> inProgress);00044 00045 <span class="keywordtype">void</span> SignaturePairwiseConsistencyTest(<span class="keyword">const</span> <a class="code" href="class_p_k___signer.html">PK_Signer</a> &amp;signer, <span class="keyword">const</span> <a class="code" href="class_p_k___verifier.html">PK_Verifier</a> &amp;verifier);00046 <span class="keywordtype">void</span> EncryptionPairwiseConsistencyTest(<span class="keyword">const</span> <a class="code" href="class_p_k___encryptor.html">PK_Encryptor</a> &amp;encryptor, <span class="keyword">const</span> <a class="code" href="class_p_k___decryptor.html">PK_Decryptor</a> &amp;decryptor);00047 00048 NAMESPACE_END00049 00050 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:15 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 + =
减小字号Ctrl + -
显示快捷键?