blob: 0ef9812032af878b0da900eb1a4ad61c15a53a66 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Reference to a `BigNum`"><meta name="keywords" content="rust, rustlang, rust-lang, BigNumRef"><title>BigNumRef in openssl::bn - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">BigNumRef</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.add_word">add_word</a></li><li><a href="#method.checked_add">checked_add</a></li><li><a href="#method.checked_div">checked_div</a></li><li><a href="#method.checked_mul">checked_mul</a></li><li><a href="#method.checked_rem">checked_rem</a></li><li><a href="#method.checked_sub">checked_sub</a></li><li><a href="#method.clear">clear</a></li><li><a href="#method.clear_bit">clear_bit</a></li><li><a href="#method.div_rem">div_rem</a></li><li><a href="#method.div_word">div_word</a></li><li><a href="#method.exp">exp</a></li><li><a href="#method.gcd">gcd</a></li><li><a href="#method.generate_prime">generate_prime</a></li><li><a href="#method.is_bit_set">is_bit_set</a></li><li><a href="#method.is_const_time">is_const_time</a></li><li><a href="#method.is_negative">is_negative</a></li><li><a href="#method.is_prime">is_prime</a></li><li><a href="#method.is_prime_fasttest">is_prime_fasttest</a></li><li><a href="#method.is_secure">is_secure</a></li><li><a href="#method.lshift">lshift</a></li><li><a href="#method.lshift1">lshift1</a></li><li><a href="#method.mask_bits">mask_bits</a></li><li><a href="#method.mod_add">mod_add</a></li><li><a href="#method.mod_exp">mod_exp</a></li><li><a href="#method.mod_inverse">mod_inverse</a></li><li><a href="#method.mod_mul">mod_mul</a></li><li><a href="#method.mod_sqr">mod_sqr</a></li><li><a href="#method.mod_sub">mod_sub</a></li><li><a href="#method.mod_word">mod_word</a></li><li><a href="#method.mul_word">mul_word</a></li><li><a href="#method.nnmod">nnmod</a></li><li><a href="#method.num_bits">num_bits</a></li><li><a href="#method.num_bytes">num_bytes</a></li><li><a href="#method.pseudo_rand">pseudo_rand</a></li><li><a href="#method.pseudo_rand_range">pseudo_rand_range</a></li><li><a href="#method.rand">rand</a></li><li><a href="#method.rand_range">rand_range</a></li><li><a href="#method.rshift">rshift</a></li><li><a href="#method.rshift1">rshift1</a></li><li><a href="#method.set_bit">set_bit</a></li><li><a href="#method.set_const_time">set_const_time</a></li><li><a href="#method.set_negative">set_negative</a></li><li><a href="#method.sqr">sqr</a></li><li><a href="#method.sub_word">sub_word</a></li><li><a href="#method.to_asn1_integer">to_asn1_integer</a></li><li><a href="#method.to_dec_str">to_dec_str</a></li><li><a href="#method.to_hex_str">to_hex_str</a></li><li><a href="#method.to_owned">to_owned</a></li><li><a href="#method.to_vec">to_vec</a></li><li><a href="#method.to_vec_padded">to_vec_padded</a></li><li><a href="#method.ucmp">ucmp</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Add%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef">Add&lt;&amp;&#39;b BigNum&gt;</a></li><li><a href="#impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum">Add&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef">Add&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-AsRef%3CBigNumRef%3E-for-BigNum">AsRef&lt;BigNumRef&gt;</a></li><li><a href="#impl-Borrow%3CBigNumRef%3E-for-BigNum">Borrow&lt;BigNumRef&gt;</a></li><li><a href="#impl-Debug-for-BigNumRef">Debug</a></li><li><a href="#impl-Display-for-BigNumRef">Display</a></li><li><a href="#impl-Div%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef">Div&lt;&amp;&#39;b BigNum&gt;</a></li><li><a href="#impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum">Div&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef">Div&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Eq-for-BigNumRef">Eq</a></li><li><a href="#impl-ForeignTypeRef-for-BigNumRef">ForeignTypeRef</a></li><li><a href="#impl-Mul%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef">Mul&lt;&amp;&#39;b BigNum&gt;</a></li><li><a href="#impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum">Mul&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef">Mul&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Neg-for-%26%27a%20BigNumRef">Neg</a></li><li><a href="#impl-Ord-for-BigNumRef">Ord</a></li><li><a href="#impl-PartialEq%3CBigNum%3E-for-BigNumRef">PartialEq&lt;BigNum&gt;</a></li><li><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNum">PartialEq&lt;BigNumRef&gt;</a></li><li><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNumRef">PartialEq&lt;BigNumRef&gt;</a></li><li><a href="#impl-PartialOrd%3CBigNum%3E-for-BigNumRef">PartialOrd&lt;BigNum&gt;</a></li><li><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNum">PartialOrd&lt;BigNumRef&gt;</a></li><li><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNumRef">PartialOrd&lt;BigNumRef&gt;</a></li><li><a href="#impl-Rem%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef">Rem&lt;&amp;&#39;b BigNum&gt;</a></li><li><a href="#impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum">Rem&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef">Rem&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Send-for-BigNumRef">Send</a></li><li><a href="#impl-Shl%3Ci32%3E-for-%26%27a%20BigNumRef">Shl&lt;i32&gt;</a></li><li><a href="#impl-Shr%3Ci32%3E-for-%26%27a%20BigNumRef">Shr&lt;i32&gt;</a></li><li><a href="#impl-Sub%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef">Sub&lt;&amp;&#39;b BigNum&gt;</a></li><li><a href="#impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum">Sub&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef">Sub&lt;&amp;&#39;b BigNumRef&gt;</a></li><li><a href="#impl-Sync-for-BigNumRef">Sync</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-BigNumRef">!RefUnwindSafe</a></li><li><a href="#impl-Unpin-for-BigNumRef">Unpin</a></li><li><a href="#impl-UnwindSafe-for-BigNumRef">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-BigNumRef">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-BigNumRef">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-BigNumRef">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-BigNumRef">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-BigNumRef">Into&lt;U&gt;</a></li><li><a href="#impl-ToString-for-BigNumRef">ToString</a></li><li><a href="#impl-TryFrom%3CU%3E-for-BigNumRef">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-BigNumRef">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In openssl::bn</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">openssl</a>::<wbr><a href="index.html">bn</a>::<wbr><a class="struct" href="#">BigNumRef</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/openssl/bn.rs.html#123-155">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct BigNumRef(_);</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Reference to a <a href="struct.BigNum.html"><code>BigNum</code></a></p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#157-894">source</a><a href="#impl-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clear" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#162-164">source</a><h4 class="code-header">pub fn <a href="#method.clear" class="fnname">clear</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Erases the memory used by this <code>BigNum</code>, resetting its value to 0.</p>
<p>This can be used to destroy sensitive data such as keys when they are no longer needed.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_clear.html"><code>BN_clear</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_word" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#168-170">source</a><h4 class="code-header">pub fn <a href="#method.add_word" class="fnname">add_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Adds a <code>u32</code> to <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_add_word.html"><code>BN_add_word</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub_word" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#174-176">source</a><h4 class="code-header">pub fn <a href="#method.sub_word" class="fnname">sub_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Subtracts a <code>u32</code> from <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sub_word.html"><code>BN_sub_word</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul_word" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#180-182">source</a><h4 class="code-header">pub fn <a href="#method.mul_word" class="fnname">mul_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Multiplies a <code>u32</code> by <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mul_word.html"><code>BN_mul_word</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_word" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#187-196">source</a><h4 class="code-header">pub fn <a href="#method.div_word" class="fnname">div_word</a>(&amp;mut self, w: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Divides <code>self</code> by a <code>u32</code>, returning the remainder.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div_word.html"><code>BN_div_word</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_word" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#201-210">source</a><h4 class="code-header">pub fn <a href="#method.mod_word" class="fnname">mod_word</a>(&amp;self, w: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the result of <code>self</code> modulo <code>w</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_word.html"><code>BN_mod_word</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rand_range" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#215-217">source</a><h4 class="code-header">pub fn <a href="#method.rand_range" class="fnname">rand_range</a>(&amp;self, rnd: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places a cryptographically-secure pseudo-random nonnegative
number less than <code>self</code> in <code>rnd</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rand_range.html"><code>BN_rand_range</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pseudo_rand_range" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#222-224">source</a><h4 class="code-header">pub fn <a href="#method.pseudo_rand_range" class="fnname">pseudo_rand_range</a>(&amp;self, rnd: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>The cryptographically weak counterpart to <code>rand_in_range</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_pseudo_rand_range.html"><code>BN_pseudo_rand_range</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_bit" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#231-233">source</a><h4 class="code-header">pub fn <a href="#method.set_bit" class="fnname">set_bit</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets bit <code>n</code>. Equivalent to <code>self |= (1 &lt;&lt; n)</code>.</p>
<p>When setting a bit outside of <code>self</code>, it is expanded.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_bit.html"><code>BN_set_bit</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clear_bit" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#240-242">source</a><h4 class="code-header">pub fn <a href="#method.clear_bit" class="fnname">clear_bit</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Clears bit <code>n</code>, setting it to 0. Equivalent to <code>self &amp;= ~(1 &lt;&lt; n)</code>.</p>
<p>When clearing a bit outside of <code>self</code>, an error is returned.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_clear_bit.html"><code>BN_clear_bit</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_bit_set" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#247-249">source</a><h4 class="code-header">pub fn <a href="#method.is_bit_set" class="fnname">is_bit_set</a>(&amp;self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the <code>n</code>th bit of <code>self</code> is set to 1, <code>false</code> otherwise.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_bit_set.html"><code>BN_is_bit_set</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mask_bits" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#256-258">source</a><h4 class="code-header">pub fn <a href="#method.mask_bits" class="fnname">mask_bits</a>(&amp;mut self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Truncates <code>self</code> to the lowest <code>n</code> bits.</p>
<p>An error occurs if <code>self</code> is already shorter than <code>n</code> bits.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mask_bits.html"><code>BN_mask_bits</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lshift1" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#262-264">source</a><h4 class="code-header">pub fn <a href="#method.lshift1" class="fnname">lshift1</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &lt;&lt; 1</code> in <code>self</code>. Equivalent to <code>self * 2</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_lshift1.html"><code>BN_lshift1</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rshift1" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#268-270">source</a><h4 class="code-header">pub fn <a href="#method.rshift1" class="fnname">rshift1</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &gt;&gt; 1</code> in <code>self</code>. Equivalent to <code>self / 2</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rshift1.html"><code>BN_rshift1</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_add" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#276-278">source</a><h4 class="code-header">pub fn <a href="#method.checked_add" class="fnname">checked_add</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a + b</code> in <code>self</code>. <a href="struct.BigNumRef.html#method.add"><code>core::ops::Add</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_add.html"><code>BN_add</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_sub" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#284-286">source</a><h4 class="code-header">pub fn <a href="#method.checked_sub" class="fnname">checked_sub</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a - b</code> in <code>self</code>. <a href="struct.BigNumRef.html#method.sub"><code>core::ops::Sub</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sub.html"><code>BN_sub</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lshift" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#291-293">source</a><h4 class="code-header">pub fn <a href="#method.lshift" class="fnname">lshift</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &lt;&lt; n</code> in <code>self</code>. Equivalent to <code>a * 2 ^ n</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_lshift.html"><code>BN_lshift</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rshift" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#298-300">source</a><h4 class="code-header">pub fn <a href="#method.rshift" class="fnname">rshift</a>(&amp;mut self, a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places <code>a &gt;&gt; n</code> in <code>self</code>. Equivalent to <code>a / 2 ^ n</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rshift.html"><code>BN_rshift</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_owned" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#304-306">source</a><h4 class="code-header">pub fn <a href="#method.to_owned" class="fnname">to_owned</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Creates a new BigNum with the same value.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_dup.html"><code>BN_dup</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_negative" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#311-313">source</a><h4 class="code-header">pub fn <a href="#method.set_negative" class="fnname">set_negative</a>(&amp;mut self, negative: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Sets the sign of <code>self</code>. Pass true to set <code>self</code> to a negative. False sets
<code>self</code> positive.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_negative.html"><code>BN_set_negative</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ucmp" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#328-330">source</a><h4 class="code-header">pub fn <a href="#method.ucmp" class="fnname">ucmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class="docblock"><p>Compare the absolute values of <code>self</code> and <code>oth</code>.</p>
<h5 id="examples"><a href="#examples">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">8</span>).unwrap();
<span class="kw">let </span>o = BigNum::from_u32(<span class="number">8</span>).unwrap();
<span class="macro">assert_eq!</span>(s.ucmp(<span class="kw-2">&amp;</span>o), Ordering::Equal);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_ucmp.html"><code>BN_ucmp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_negative" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#334-336">source</a><h4 class="code-header">pub fn <a href="#method.is_negative" class="fnname">is_negative</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if <code>self</code> is negative.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_negative.html"><code>BN_is_negative</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_bits" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#341-343">source</a><h4 class="code-header">pub fn <a href="#method.num_bits" class="fnname">num_bits</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Returns the number of significant bits in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_num_bits.html"><code>BN_num_bits</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_bytes" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#346-348">source</a><h4 class="code-header">pub fn <a href="#method.num_bytes" class="fnname">num_bytes</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></h4></section></summary><div class="docblock"><p>Returns the size of <code>self</code> in bytes. Implemented natively.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rand" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#376-386">source</a><h4 class="code-header">pub fn <a href="#method.rand" class="fnname">rand</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;bits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;msb: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;odd: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Generates a cryptographically strong pseudo-random <code>BigNum</code>, placing it in <code>self</code>.</p>
<h5 id="parameters"><a href="#parameters">Parameters</a></h5>
<ul>
<li><code>bits</code>: Length of the number in bits.</li>
<li><code>msb</code>: The desired properties of the most significant bit. See <a href="index.html#constants"><code>constants</code></a>.</li>
<li><code>odd</code>: If <code>true</code>, the generated number will be odd.</li>
</ul>
<h5 id="examples-1"><a href="#examples-1">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::{BigNum, MsbOption};
<span class="kw">use </span>openssl::error::ErrorStack;
<span class="kw">fn </span>generate_random() -&gt; <span class="prelude-ty">Result</span>&lt; BigNum, ErrorStack &gt; {
<span class="kw">let </span><span class="kw-2">mut </span>big = BigNum::new()<span class="question-mark">?</span>;
<span class="comment">// Generates a 128-bit odd random number
</span>big.rand(<span class="number">128</span>, MsbOption::MAYBE_ZERO, <span class="bool-val">true</span>);
<span class="prelude-val">Ok</span>((big))
}</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_rand.html"><code>BN_rand</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pseudo_rand" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#392-402">source</a><h4 class="code-header">pub fn <a href="#method.pseudo_rand" class="fnname">pseudo_rand</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;bits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;msb: <a class="struct" href="struct.MsbOption.html" title="struct openssl::bn::MsbOption">MsbOption</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;odd: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>The cryptographically weak counterpart to <code>rand</code>. Not suitable for key generation.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_pseudo_rand.html"><code>BN_pseudo_rand</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.generate_prime" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#428-446">source</a><h4 class="code-header">pub fn <a href="#method.generate_prime" class="fnname">generate_prime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;bits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;safe: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;add: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;rem: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Generates a prime number, placing it in <code>self</code>.</p>
<h5 id="parameters-1"><a href="#parameters-1">Parameters</a></h5>
<ul>
<li><code>bits</code>: The length of the prime in bits (lower bound).</li>
<li><code>safe</code>: If true, returns a “safe” prime <code>p</code> so that <code>(p-1)/2</code> is also prime.</li>
<li><code>add</code>/<code>rem</code>: If <code>add</code> is set to <code>Some(add)</code>, <code>p % add == rem</code> will hold, where <code>p</code> is the
generated prime and <code>rem</code> is <code>1</code> if not specified (<code>None</code>).</li>
</ul>
<h5 id="examples-2"><a href="#examples-2">Examples</a></h5>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>openssl::bn::BigNum;
<span class="kw">use </span>openssl::error::ErrorStack;
<span class="kw">fn </span>generate_weak_prime() -&gt; <span class="prelude-ty">Result</span>&lt; BigNum, ErrorStack &gt; {
<span class="kw">let </span><span class="kw-2">mut </span>big = BigNum::new()<span class="question-mark">?</span>;
<span class="comment">// Generates a 128-bit simple prime number
</span>big.generate_prime(<span class="number">128</span>, <span class="bool-val">false</span>, <span class="prelude-val">None</span>, <span class="prelude-val">None</span>);
<span class="prelude-val">Ok</span>((big))
}</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_generate_prime_ex.html"><code>BN_generate_prime_ex</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_mul" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#453-468">source</a><h4 class="code-header">pub fn <a href="#method.checked_mul" class="fnname">checked_mul</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a * b</code> in <code>self</code>.
<a href="struct.BigNumRef.html#method.mul"><code>core::ops::Mul</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mul.html"><code>BN_mul</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_div" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#475-491">source</a><h4 class="code-header">pub fn <a href="#method.checked_div" class="fnname">checked_div</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a / b</code> in <code>self</code>. The remainder is discarded.
<a href="struct.BigNumRef.html#method.div"><code>core::ops::Div</code></a> is also implemented for <code>BigNumRef</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.checked_rem" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#495-511">source</a><h4 class="code-header">pub fn <a href="#method.checked_rem" class="fnname">checked_rem</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a % b</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div_rem" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#515-532">source</a><h4 class="code-header">pub fn <a href="#method.div_rem" class="fnname">div_rem</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;rem: &amp;mut <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a / b</code> in <code>self</code> and <code>a % b</code> in <code>rem</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_div.html"><code>BN_div</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sqr" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#536-538">source</a><h4 class="code-header">pub fn <a href="#method.sqr" class="fnname">sqr</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code></code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_sqr.html"><code>BN_sqr</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.nnmod" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#543-558">source</a><h4 class="code-header">pub fn <a href="#method.nnmod" class="fnname">nnmod</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a mod m</code> in <code>self</code>. As opposed to <code>div_rem</code>
the result is non-negative.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_nnmod.html"><code>BN_nnmod</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_add" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#562-579">source</a><h4 class="code-header">pub fn <a href="#method.mod_add" class="fnname">mod_add</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a + b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_add.html"><code>BN_mod_add</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_sub" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#583-600">source</a><h4 class="code-header">pub fn <a href="#method.mod_sub" class="fnname">mod_sub</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a - b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_sub.html"><code>BN_mod_sub</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_mul" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#604-621">source</a><h4 class="code-header">pub fn <a href="#method.mod_mul" class="fnname">mod_mul</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>(a * b) mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_mul.html"><code>BN_mod_mul</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_sqr" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#625-640">source</a><h4 class="code-header">pub fn <a href="#method.mod_sqr" class="fnname">mod_sqr</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a² mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_sqr.html"><code>BN_mod_sqr</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.exp" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#644-659">source</a><h4 class="code-header">pub fn <a href="#method.exp" class="fnname">exp</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;p: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a^p</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_exp.html"><code>BN_exp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_exp" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#663-680">source</a><h4 class="code-header">pub fn <a href="#method.mod_exp" class="fnname">mod_exp</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;p: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;m: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the result of <code>a^p mod m</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_exp.html"><code>BN_mod_exp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mod_inverse" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#684-699">source</a><h4 class="code-header">pub fn <a href="#method.mod_inverse" class="fnname">mod_inverse</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;n: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the inverse of <code>a</code> modulo <code>n</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_mod_inverse.html"><code>BN_mod_inverse</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gcd" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#703-718">source</a><h4 class="code-header">pub fn <a href="#method.gcd" class="fnname">gcd</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;a: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;b: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Places the greatest common denominator of <code>a</code> and <code>b</code> in <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_gcd.html"><code>BN_gcd</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_prime" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#730-740">source</a><h4 class="code-header">pub fn <a href="#method.is_prime" class="fnname">is_prime</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;checks: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Checks whether <code>self</code> is prime.</p>
<p>Performs a Miller-Rabin probabilistic primality test with <code>checks</code> iterations.</p>
<h5 id="return-value"><a href="#return-value">Return Value</a></h5>
<p>Returns <code>true</code> if <code>self</code> is prime with an error probability of less than <code>0.25 ^ checks</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_prime_ex.html"><code>BN_is_prime_ex</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_prime_fasttest" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#754-770">source</a><h4 class="code-header">pub fn <a href="#method.is_prime_fasttest" class="fnname">is_prime_fasttest</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;checks: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut <a class="struct" href="struct.BigNumContextRef.html" title="struct openssl::bn::BigNumContextRef">BigNumContextRef</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;do_trial_division: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Checks whether <code>self</code> is prime with optional trial division.</p>
<p>If <code>do_trial_division</code> is <code>true</code>, first performs trial division by a number of small primes.
Then, like <code>is_prime</code>, performs a Miller-Rabin probabilistic primality test with <code>checks</code>
iterations.</p>
<h5 id="return-value-1"><a href="#return-value-1">Return Value</a></h5>
<p>Returns <code>true</code> if <code>self</code> is prime with an error probability of less than <code>0.25 ^ checks</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_is_prime_fasttest_ex.html"><code>BN_is_prime_fasttest_ex</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#785-793">source</a><h4 class="code-header">pub fn <a href="#method.to_vec" class="fnname">to_vec</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a big-endian byte vector representation of the absolute value of <code>self</code>.</p>
<p><code>self</code> can be recreated by using <code>from_slice</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">4543</span>).unwrap();
<span class="kw">let </span>r = BigNum::from_u32(<span class="number">4543</span>).unwrap();
<span class="kw">let </span>s_vec = s.to_vec();
<span class="macro">assert_eq!</span>(BigNum::from_slice(<span class="kw-2">&amp;</span>s_vec).unwrap(), r);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2bin.html"><code>BN_bn2bin</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_vec_padded" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#818-825">source</a><h4 class="code-header">pub fn <a href="#method.to_vec_padded" class="fnname">to_vec_padded</a>(&amp;self, pad_to: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>&gt;, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a big-endian byte vector representation of the absolute value of <code>self</code> padded
to <code>pad_to</code> bytes.</p>
<p>If <code>pad_to</code> is less than <code>self.num_bytes()</code> then an error is returned.</p>
<p><code>self</code> can be recreated by using <code>from_slice</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>bn = BigNum::from_u32(<span class="number">0x4543</span>).unwrap();
<span class="kw">let </span>bn_vec = bn.to_vec_padded(<span class="number">4</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bn_vec, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0x45</span>, <span class="number">0x43</span>]);
<span class="kw">let </span>r = bn.to_vec_padded(<span class="number">1</span>);
<span class="macro">assert!</span>(r.is_err());
<span class="kw">let </span>bn = -BigNum::from_u32(<span class="number">0x4543</span>).unwrap();
<span class="kw">let </span>bn_vec = bn.to_vec_padded(<span class="number">4</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>bn_vec, <span class="kw-2">&amp;</span>[<span class="number">0</span>, <span class="number">0</span>, <span class="number">0x45</span>, <span class="number">0x43</span>]);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2binpad.html"><code>BN_bn2binpad</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_dec_str" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#836-841">source</a><h4 class="code-header">pub fn <a href="#method.to_dec_str" class="fnname">to_dec_str</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../string/struct.OpensslString.html" title="struct openssl::string::OpensslString">OpensslString</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a decimal string representation of <code>self</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">12345</span>).unwrap();
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;**</span>s.to_dec_str().unwrap(), <span class="string">&quot;-12345&quot;</span>);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2dec.html"><code>BN_bn2dec</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_hex_str" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#852-857">source</a><h4 class="code-header">pub fn <a href="#method.to_hex_str" class="fnname">to_hex_str</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../string/struct.OpensslString.html" title="struct openssl::string::OpensslString">OpensslString</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a hexadecimal string representation of <code>self</code>.</p>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>s = -BigNum::from_u32(<span class="number">0x99ff</span>).unwrap();
<span class="macro">assert_eq!</span>(s.to_hex_str().unwrap().to_uppercase(), <span class="string">&quot;-99FF&quot;</span>);</code></pre></div>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_bn2hex.html"><code>BN_bn2hex</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_asn1_integer" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#861-866">source</a><h4 class="code-header">pub fn <a href="#method.to_asn1_integer" class="fnname">to_asn1_integer</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../asn1/struct.Asn1Integer.html" title="struct openssl::asn1::Asn1Integer">Asn1Integer</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns an <code>Asn1Integer</code> containing the value of <code>self</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_to_ASN1_INTEGER.html"><code>BN_to_ASN1_INTEGER</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_const_time" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#871-873">source</a><h4 class="code-header">pub fn <a href="#method.set_const_time" class="fnname">set_const_time</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Force constant time computation on this value.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_set_flags.html"><code>BN_set_flags</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_const_time" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#878-883">source</a><h4 class="code-header">pub fn <a href="#method.is_const_time" class="fnname">is_const_time</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if <code>self</code> is in const time mode.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_flags.html"><code>BN_get_flags</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_secure" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#888-893">source</a><h4 class="code-header">pub fn <a href="#method.is_secure" class="fnname">is_secure</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns true if <code>self</code> was created with <a href="struct.BigNum.html#method.new_secure" title="BigNum::new_secure"><code>BigNum::new_secure</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/BN_get_flags.html"><code>BN_get_flags</code></a>.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1252">source</a><a href="#impl-Add%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1252">source</a><a href="#method.add-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1252">source</a><a href="#impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-2" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-2" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1252">source</a><a href="#method.add-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1242-1250">source</a><a href="#impl-Add%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html" title="trait core::ops::arith::Add">Add</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>+</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1245-1249">source</a><a href="#method.add" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add" class="fnname">add</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>+</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Add.html#tymethod.add">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-AsRef%3CBigNumRef%3E-for-BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#impl-AsRef%3CBigNumRef%3E-for-BigNum" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#method.as_ref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html#tymethod.as_ref" class="fnname">as_ref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Converts this type into a shared reference of the (usually inferred) input type.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Borrow%3CBigNumRef%3E-for-BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#impl-Borrow%3CBigNumRef%3E-for-BigNum" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Debug-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1114-1121">source</a><a href="#impl-Debug-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1115-1120">source</a><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Display-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1132-1139">source</a><a href="#impl-Display-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.fmt-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1133-1138">source</a><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Div%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1290">source</a><a href="#impl-Div%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-10" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-10" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1290">source</a><a href="#method.div-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div" class="fnname">div</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1290">source</a><a href="#impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-11" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-11" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1290">source</a><a href="#method.div-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div" class="fnname">div</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1279-1288">source</a><a href="#impl-Div%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html" title="trait core::ops::arith::Div">Div</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-9" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-9" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>/</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.div" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1282-1287">source</a><a href="#method.div" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div" class="fnname">div</a>(self, oth: &amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>/</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Div.html#tymethod.div">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ForeignTypeRef-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#impl-ForeignTypeRef-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="../../foreign_types_shared/trait.ForeignTypeRef.html" title="trait foreign_types_shared::ForeignTypeRef">ForeignTypeRef</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.CType" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.CType" class="anchor"></a><h4 class="code-header">type <a href="../../foreign_types_shared/trait.ForeignTypeRef.html#associatedtype.CType" class="associatedtype">CType</a> = <a class="enum" href="../../openssl_sys/openssl/handwritten/types/enum.BIGNUM.html" title="enum openssl_sys::openssl::handwritten::types::BIGNUM">BIGNUM</a></h4></section></summary><div class='docblock'>The raw C type.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_ptr" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/foreign_types_shared/lib.rs.html#36">source</a><a href="#method.from_ptr" class="anchor"></a><h4 class="code-header">unsafe fn <a href="../../foreign_types_shared/trait.ForeignTypeRef.html#method.from_ptr" class="fnname">from_ptr</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>Self::<a class="associatedtype" href="../../foreign_types_shared/trait.ForeignTypeRef.html#associatedtype.CType" title="type foreign_types_shared::ForeignTypeRef::CType">CType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self</h4></section></summary><div class='docblock'>Constructs a shared instance of this type from its raw type.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from_ptr_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/foreign_types_shared/lib.rs.html#42">source</a><a href="#method.from_ptr_mut" class="anchor"></a><h4 class="code-header">unsafe fn <a href="../../foreign_types_shared/trait.ForeignTypeRef.html#method.from_ptr_mut" class="fnname">from_ptr_mut</a>&lt;'a&gt;(ptr: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>Self::<a class="associatedtype" href="../../foreign_types_shared/trait.ForeignTypeRef.html#associatedtype.CType" title="type foreign_types_shared::ForeignTypeRef::CType">CType</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a mut </a>Self</h4></section></summary><div class='docblock'>Constructs a mutable reference of this type from its raw type.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_ptr" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/foreign_types_shared/lib.rs.html#48">source</a><a href="#method.as_ptr" class="anchor"></a><h4 class="code-header">fn <a href="../../foreign_types_shared/trait.ForeignTypeRef.html#method.as_ptr" class="fnname">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a>Self::<a class="associatedtype" href="../../foreign_types_shared/trait.ForeignTypeRef.html#associatedtype.CType" title="type foreign_types_shared::ForeignTypeRef::CType">CType</a></h4></section></summary><div class='docblock'>Returns a raw pointer to the wrapped value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1277">source</a><a href="#impl-Mul%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-7" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-7" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1277">source</a><a href="#method.mul-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul" class="fnname">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1277">source</a><a href="#impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-8" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-8" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1277">source</a><a href="#method.mul-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul" class="fnname">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1266-1275">source</a><a href="#impl-Mul%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html" title="trait core::ops::arith::Mul">Mul</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-6" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-6" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>*</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.mul" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1269-1274">source</a><a href="#method.mul" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul" class="fnname">mul</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>*</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Mul.html#tymethod.mul">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Neg-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1341-1347">source</a><a href="#impl-Neg-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Neg.html" title="trait core::ops::arith::Neg">Neg</a> for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-17" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-17" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Neg.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.neg" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1344-1346">source</a><a href="#method.neg" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Neg.html#tymethod.neg" class="fnname">neg</a>(self) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the unary <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Neg.html#tymethod.neg">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Ord-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1190-1194">source</a><a href="#impl-Ord-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1191-1193">source</a><a href="#method.cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp" class="fnname">cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a></h4></section></summary><div class='docblock'>This method returns an <a href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="Ordering"><code>Ordering</code></a> between <code>self</code> and <code>other</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#tymethod.cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#795-798">source</a></span><a href="#method.max" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max" class="fnname">max</a>(self, other: Self) -&gt; Self</h4></section></summary><div class='docblock'>Compares and returns the maximum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.max">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.min" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.21.0">1.21.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#822-825">source</a></span><a href="#method.min" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min" class="fnname">min</a>(self, other: Self) -&gt; Self</h4></section></summary><div class='docblock'>Compares and returns the minimum of two values. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.min">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clamp" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.50.0">1.50.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#854-858">source</a></span><a href="#method.clamp" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp" class="fnname">clamp</a>(self, min: Self, max: Self) -&gt; Self<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;Self&gt;,</span></h4></section></summary><div class='docblock'>Restrict a value to a certain interval. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html#method.clamp">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBigNum%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1156-1160">source</a><a href="#impl-PartialEq%3CBigNum%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1157-1159">source</a><a href="#method.eq-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-1" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBigNumRef%3E-for-BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1170-1174">source</a><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNum" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1171-1173">source</a><a href="#method.eq-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne-2" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialEq%3CBigNumRef%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1150-1154">source</a><a href="#impl-PartialEq%3CBigNumRef%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.eq" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1151-1153">source</a><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ne" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#227">source</a></span><a href="#method.ne" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests for <code>!=</code>. The default implementation is almost always
sufficient, and should not be overridden without very good reason. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBigNum%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1184-1188">source</a><a href="#impl-PartialOrd%3CBigNum%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1185-1187">source</a><a href="#method.partial_cmp-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-1" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-1" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-1" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-1" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBigNumRef%3E-for-BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1202-1206">source</a><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNum" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1203-1205">source</a><a href="#method.partial_cmp-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt-2" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le-2" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt-2" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge-2" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge-2" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-PartialOrd%3CBigNumRef%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1178-1182">source</a><a href="#impl-PartialOrd%3CBigNumRef%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a>&lt;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.partial_cmp" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1179-1181">source</a><a href="#method.partial_cmp" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp" class="fnname">partial_cmp</a>(&amp;self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/cmp/enum.Ordering.html" title="enum core::cmp::Ordering">Ordering</a>&gt;</h4></section></summary><div class='docblock'>This method returns an ordering between <code>self</code> and <code>other</code> values if one exists. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#tymethod.partial_cmp">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.lt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1119">source</a></span><a href="#method.lt" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt" class="fnname">lt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.lt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.le" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1138">source</a></span><a href="#method.le" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le" class="fnname">le</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests less than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&lt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.le">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.gt" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1156">source</a></span><a href="#method.gt" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt" class="fnname">gt</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;</code> operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.gt">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ge" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#1175">source</a></span><a href="#method.ge" class="anchor"></a><h4 class="code-header">const fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge" class="fnname">ge</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class='docblock'>This method tests greater than or equal to (for <code>self</code> and <code>other</code>) and is used by the <code>&gt;=</code>
operator. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html#method.ge">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1303">source</a><a href="#impl-Rem%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-13" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-13" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rem-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1303">source</a><a href="#method.rem-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem" class="fnname">rem</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1303">source</a><a href="#impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-14" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-14" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rem-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1303">source</a><a href="#method.rem-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem" class="fnname">rem</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1292-1301">source</a><a href="#impl-Rem%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html" title="trait core::ops::arith::Rem">Rem</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-12" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-12" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>%</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.rem" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1295-1300">source</a><a href="#method.rem" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem" class="fnname">rem</a>(self, oth: &amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>%</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Rem.html#tymethod.rem">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Shl%3Ci32%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1305-1313">source</a><a href="#impl-Shl%3Ci32%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shl.html" title="trait core::ops::bit::Shl">Shl</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-15" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-15" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shl.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&lt;&lt;</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.shl" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1308-1312">source</a><a href="#method.shl" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shl.html#tymethod.shl" class="fnname">shl</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>&lt;&lt;</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shl.html#tymethod.shl">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Shr%3Ci32%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1323-1331">source</a><a href="#impl-Shr%3Ci32%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shr.html" title="trait core::ops::bit::Shr">Shr</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-16" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-16" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shr.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>&gt;&gt;</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.shr" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1326-1330">source</a><a href="#method.shr" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shr.html#tymethod.shr" class="fnname">shr</a>(self, n: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>&gt;&gt;</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/bit/trait.Shr.html#tymethod.shr">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1264">source</a><a href="#impl-Sub%3C%26%27b%20BigNum%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-4" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-4" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub-1" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1264">source</a><a href="#method.sub-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1264">source</a><a href="#impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNum" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-5" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-5" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub-2" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1264">source</a><a href="#method.sub-2" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1254-1262">source</a><a href="#impl-Sub%3C%26%27b%20BigNumRef%3E-for-%26%27a%20BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;'a, 'b&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html" title="trait core::ops::arith::Sub">Sub</a>&lt;&amp;'b <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>&gt; for &amp;'a <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Output-3" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Output-3" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>The resulting type after applying the <code>-</code> operator.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.sub" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1257-1261">source</a><a href="#method.sub" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub" class="fnname">sub</a>(self, oth: &amp;<a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a>) -&gt; <a class="struct" href="struct.BigNum.html" title="struct openssl::bn::BigNum">BigNum</a></h4></section></summary><div class='docblock'>Performs the <code>-</code> operation. <a href="https://doc.rust-lang.org/nightly/core/ops/arith/trait.Sub.html#tymethod.sub">Read more</a></div></details></div></details><section id="impl-Eq-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#1162">source</a><a href="#impl-Eq-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section><section id="impl-Send-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#impl-Send-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section><section id="impl-Sync-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/bn.rs.html#123-155">source</a><a href="#impl-Sync-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-BigNumRef" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section><section id="impl-Unpin-for-BigNumRef" class="impl has-srclink"><a href="#impl-Unpin-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section><section id="impl-UnwindSafe-for-BigNumRef" class="impl has-srclink"><a href="#impl-UnwindSafe-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.BigNumRef.html" title="struct openssl::bn::BigNumRef">BigNumRef</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow-1" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-ToString-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2497">source</a><a href="#impl-ToString-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.to_string" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2503">source</a><a href="#method.to_string" class="anchor"></a><h4 class="code-header">default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class='docblock'>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-BigNumRef" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-BigNumRef" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="openssl" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>