📄 dsa_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++: dsa.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>dsa.h</h1><a href="dsa_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef CRYPTOPP_DSA_H</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_DSA_H</span>00003 <span class="preprocessor"></span><span class="comment"></span>00004 <span class="comment">/** \file</span>00005 <span class="comment">*/</span>00006 00007 <span class="preprocessor">#include "<a class="code" href="gfpcrypt_8h.html">gfpcrypt.h</a>"</span>00008 00009 NAMESPACE_BEGIN(CryptoPP)00010 00011 <span class="comment">/*! The DSA signature format used by Crypto++ is as defined by IEEE P1363.</span>00012 <span class="comment"> Java uses the DER format, and OpenPGP uses the OpenPGP format. */</span><a name="l00013"></a><a class="code" href="dsa_8h.html#a4">00013</a> <span class="keyword">enum</span> <a class="code" href="dsa_8h.html#a4">DSASignatureFormat</a> {DSA_P1363, DSA_DER, DSA_OPENPGP};<span class="comment"></span>00014 <span class="comment">/** This function converts between these formats, and returns length of signature in the target format.</span>00015 <span class="comment"> If toFormat == DSA_P1363, bufferSize must equal publicKey.SignatureLength() */</span>00016 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> DSAConvertSignatureFormat(byte *buffer, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> bufferSize, DSASignatureFormat toFormat, 00017 <span class="keyword">const</span> byte *signature, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> signatureLen, DSASignatureFormat fromFormat);00018 00019 <span class="preprocessor">#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY</span>00020 <span class="preprocessor"></span>00021 <span class="keyword">typedef</span> <a class="code" href="class_d_l___s_s_a.html#_d_l___s_s_aw0">DSA::Signer</a> DSAPrivateKey;00022 <span class="keyword">typedef</span> <a class="code" href="class_d_l___s_s_a.html#_d_l___s_s_aw1">DSA::Verifier</a> DSAPublicKey;00023 00024 <span class="keyword">const</span> <span class="keywordtype">int</span> MIN_DSA_PRIME_LENGTH = DSA::MIN_PRIME_LENGTH;00025 <span class="keyword">const</span> <span class="keywordtype">int</span> MAX_DSA_PRIME_LENGTH = DSA::MAX_PRIME_LENGTH;00026 <span class="keyword">const</span> <span class="keywordtype">int</span> DSA_PRIME_LENGTH_MULTIPLE = DSA::PRIME_LENGTH_MULTIPLE;00027 00028 <span class="keywordtype">bool</span> GenerateDSAPrimes(<span class="keyword">const</span> byte *seed, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> seedLength, <span class="keywordtype">int</span> &counter, <a class="code" href="class_integer.html">Integer</a> &p, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> primeLength, <a class="code" href="class_integer.html">Integer</a> &q)00029 {<span class="keywordflow">return</span> <a class="code" href="struct_d_s_a.html#_d_s_ae1">DSA::GeneratePrimes</a>(seed, seedLength, counter, p, primeLength, q);}00030 00031 <span class="preprocessor">#endif</span>00032 <span class="preprocessor"></span>00033 NAMESPACE_END00034 00035 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:34:13 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 + -