This commit is contained in:
bthomee
2025-12-11 08:55:10 -08:00
parent 694d52f20d
commit a661b19a31
21692 changed files with 1685196 additions and 1685031 deletions

View File

@@ -89,7 +89,7 @@ $(document).ready(function() { init_codefold(0); });
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &lt;xrpl/protocol/RPCErr.h&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &lt;xrpl/protocol/jss.h&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceripple.html">ripple</a> {</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacexrpl.html">xrpl</a> {</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">namespace </span>RPC {</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">struct </span>JsonContext;</div>
@@ -101,38 +101,38 @@ $(document).ready(function() { init_codefold(0); });
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// }</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a></div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="}">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="namespaceripple.html#a8d8b456b90badc34e0e52979f6364842"> 20</a></span><a class="code hl_function" href="namespaceripple.html#a8d8b456b90badc34e0e52979f6364842">doRandom</a>(<a class="code hl_struct" href="structripple_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a>&amp; context)</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="namespacexrpl.html#a3427b93558e49d1a8a0a7705b1da2cbf"> 20</a></span><a class="code hl_function" href="namespacexrpl.html#a3427b93558e49d1a8a0a7705b1da2cbf">doRandom</a>(<a class="code hl_struct" href="structxrpl_1_1RPC_1_1JsonContext.html">RPC::JsonContext</a>&amp; context)</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span>{</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// TODO(tom): the try/catch is almost certainly redundant, we catch at the</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// top level too.</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">try</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> {</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_class" href="classripple_1_1base__uint.html">uint256</a> rand;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <a class="code hl_function" href="namespacebeast.html#ad4d3145468ad564a92ac41b9812274a0">beast::rngfill</a>(rand.begin(), rand.size(), <a class="code hl_function" href="namespaceripple.html#a64faabbdff83da8b7fd7aaafbb937867">crypto_prng</a>());</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_class" href="classxrpl_1_1base__uint.html">uint256</a> rand;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <a class="code hl_function" href="namespacebeast.html#ad4d3145468ad564a92ac41b9812274a0">beast::rngfill</a>(rand.begin(), rand.size(), <a class="code hl_function" href="namespacexrpl.html#a1ebe36764768fb123a4b87f2b30c3d64">crypto_prng</a>());</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <a class="code hl_class" href="classJson_1_1Value.html">Json::Value</a> jvResult;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> jvResult[jss::random] = <a class="code hl_function" href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">to_string</a>(rand);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> jvResult[jss::random] = <a class="code hl_function" href="namespacexrpl.html#a35ce7572092b98720a52fa343c6f2fa9">to_string</a>(rand);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordflow">return</span> jvResult;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> }</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">catch</span> (<a class="code hl_classRef" href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a> <span class="keyword">const</span>&amp;)</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">rpcError</a>(<a class="code hl_enumvalue" href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">rpcINTERNAL</a>); <span class="comment">// LCOV_EXCL_LINE</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespacexrpl.html#a7a2757753d0ad2a65951d78ad6ed408b">rpcError</a>(<a class="code hl_enumvalue" href="namespacexrpl.html#af6fadbc1b2101eff5fa78e7e2a50b76fa84460dd802aaad1833b922da3c0a6d0f">rpcINTERNAL</a>); <span class="comment">// LCOV_EXCL_LINE</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>}</div>
</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>} <span class="comment">// namespace ripple</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>} <span class="comment">// namespace xrpl</span></div>
<div class="ttc" id="aclassJson_1_1Value_html"><div class="ttname"><a href="classJson_1_1Value.html">Json::Value</a></div><div class="ttdoc">Represents a JSON value.</div><div class="ttdef"><b>Definition</b> <a href="json__value_8h_source.html#l00130">json_value.h:131</a></div></div>
<div class="ttc" id="aclassripple_1_1base__uint_html"><div class="ttname"><a href="classripple_1_1base__uint.html">ripple::base_uint&lt; 256 &gt;</a></div></div>
<div class="ttc" id="aclassxrpl_1_1base__uint_html"><div class="ttname"><a href="classxrpl_1_1base__uint.html">xrpl::base_uint&lt; 256 &gt;</a></div></div>
<div class="ttc" id="aexception_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/exception.html">std::exception</a></div></div>
<div class="ttc" id="anamespacebeast_html_ad4d3145468ad564a92ac41b9812274a0"><div class="ttname"><a href="namespacebeast.html#ad4d3145468ad564a92ac41b9812274a0">beast::rngfill</a></div><div class="ttdeci">void rngfill(void *const buffer, std::size_t const bytes, Generator &amp;g)</div><div class="ttdef"><b>Definition</b> <a href="rngfill_8h_source.html#l00015">rngfill.h:15</a></div></div>
<div class="ttc" id="anamespaceripple_html"><div class="ttname"><a href="namespaceripple.html">ripple</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00006">algorithm.h:6</a></div></div>
<div class="ttc" id="anamespaceripple_html_a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f"><div class="ttname"><a href="namespaceripple.html#a32d6d3ce1a48272b677d2c88b1d30932a839833d48b635d8df6a9176274ae922f">ripple::rpcINTERNAL</a></div><div class="ttdeci">@ rpcINTERNAL</div><div class="ttdef"><b>Definition</b> <a href="ErrorCodes_8h_source.html#l00111">ErrorCodes.h:111</a></div></div>
<div class="ttc" id="anamespaceripple_html_a64faabbdff83da8b7fd7aaafbb937867"><div class="ttname"><a href="namespaceripple.html#a64faabbdff83da8b7fd7aaafbb937867">ripple::crypto_prng</a></div><div class="ttdeci">csprng_engine &amp; crypto_prng()</div><div class="ttdoc">The default cryptographically secure PRNG.</div><div class="ttdef"><b>Definition</b> <a href="libxrpl_2crypto_2csprng_8cpp_source.html#l00084">libxrpl/crypto/csprng.cpp:84</a></div></div>
<div class="ttc" id="anamespaceripple_html_a67869382f83fd55cf3096d2591a57b07"><div class="ttname"><a href="namespaceripple.html#a67869382f83fd55cf3096d2591a57b07">ripple::rpcError</a></div><div class="ttdeci">Json::Value rpcError(int iError)</div><div class="ttdef"><b>Definition</b> <a href="RPCErr_8cpp_source.html#l00012">RPCErr.cpp:12</a></div></div>
<div class="ttc" id="anamespaceripple_html_a8d8b456b90badc34e0e52979f6364842"><div class="ttname"><a href="namespaceripple.html#a8d8b456b90badc34e0e52979f6364842">ripple::doRandom</a></div><div class="ttdeci">Json::Value doRandom(RPC::JsonContext &amp;)</div><div class="ttdef"><b>Definition</b> <a href="Random_8cpp_source.html#l00020">Random.cpp:20</a></div></div>
<div class="ttc" id="anamespaceripple_html_ac124fe6744b7fe887dec949b56b16d50"><div class="ttname"><a href="namespaceripple.html#ac124fe6744b7fe887dec949b56b16d50">ripple::to_string</a></div><div class="ttdeci">std::string to_string(base_uint&lt; Bits, Tag &gt; const &amp;a)</div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00611">base_uint.h:611</a></div></div>
<div class="ttc" id="astructripple_1_1RPC_1_1JsonContext_html"><div class="ttname"><a href="structripple_1_1RPC_1_1JsonContext.html">ripple::RPC::JsonContext</a></div><div class="ttdef"><b>Definition</b> <a href="Context_8h_source.html#l00033">Context.h:34</a></div></div>
<div class="ttc" id="anamespacexrpl_html"><div class="ttname"><a href="namespacexrpl.html">xrpl</a></div><div class="ttdoc">Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.</div><div class="ttdef"><b>Definition</b> <a href="algorithm_8h_source.html#l00006">algorithm.h:6</a></div></div>
<div class="ttc" id="anamespacexrpl_html_a1ebe36764768fb123a4b87f2b30c3d64"><div class="ttname"><a href="namespacexrpl.html#a1ebe36764768fb123a4b87f2b30c3d64">xrpl::crypto_prng</a></div><div class="ttdeci">csprng_engine &amp; crypto_prng()</div><div class="ttdoc">The default cryptographically secure PRNG.</div><div class="ttdef"><b>Definition</b> <a href="libxrpl_2crypto_2csprng_8cpp_source.html#l00084">libxrpl/crypto/csprng.cpp:84</a></div></div>
<div class="ttc" id="anamespacexrpl_html_a3427b93558e49d1a8a0a7705b1da2cbf"><div class="ttname"><a href="namespacexrpl.html#a3427b93558e49d1a8a0a7705b1da2cbf">xrpl::doRandom</a></div><div class="ttdeci">Json::Value doRandom(RPC::JsonContext &amp;)</div><div class="ttdef"><b>Definition</b> <a href="Random_8cpp_source.html#l00020">Random.cpp:20</a></div></div>
<div class="ttc" id="anamespacexrpl_html_a35ce7572092b98720a52fa343c6f2fa9"><div class="ttname"><a href="namespacexrpl.html#a35ce7572092b98720a52fa343c6f2fa9">xrpl::to_string</a></div><div class="ttdeci">std::string to_string(base_uint&lt; Bits, Tag &gt; const &amp;a)</div><div class="ttdef"><b>Definition</b> <a href="base__uint_8h_source.html#l00611">base_uint.h:611</a></div></div>
<div class="ttc" id="anamespacexrpl_html_a7a2757753d0ad2a65951d78ad6ed408b"><div class="ttname"><a href="namespacexrpl.html#a7a2757753d0ad2a65951d78ad6ed408b">xrpl::rpcError</a></div><div class="ttdeci">Json::Value rpcError(int iError)</div><div class="ttdef"><b>Definition</b> <a href="RPCErr_8cpp_source.html#l00012">RPCErr.cpp:12</a></div></div>
<div class="ttc" id="anamespacexrpl_html_af6fadbc1b2101eff5fa78e7e2a50b76fa84460dd802aaad1833b922da3c0a6d0f"><div class="ttname"><a href="namespacexrpl.html#af6fadbc1b2101eff5fa78e7e2a50b76fa84460dd802aaad1833b922da3c0a6d0f">xrpl::rpcINTERNAL</a></div><div class="ttdeci">@ rpcINTERNAL</div><div class="ttdef"><b>Definition</b> <a href="ErrorCodes_8h_source.html#l00111">ErrorCodes.h:111</a></div></div>
<div class="ttc" id="astructxrpl_1_1RPC_1_1JsonContext_html"><div class="ttname"><a href="structxrpl_1_1RPC_1_1JsonContext.html">xrpl::RPC::JsonContext</a></div><div class="ttdef"><b>Definition</b> <a href="Context_8h_source.html#l00033">Context.h:34</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>