1 <!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="A random number generator that can be explicitly seeded."><title>SeedableRng in bdk_chain::bitcoin::secp256k1::rand - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-46132b98.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="bdk_chain" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (a4cb3c831 2024-12-17)" data-channel="nightly" data-search-js="search-036cda7a.js" data-settings-js="settings-0f613d39.js" ><script src="../../../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[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" title="show sidebar"></button><a class="logo-container" href="../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../bdk_chain/index.html"><img src="https://github.com/bitcoindevkit/bdk/raw/master/static/bdk.png" alt="logo"></a><h2><a href="../../../../bdk_chain/index.html">bdk_<wbr>chain</a><span class="version">0.21.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Seedable<wbr>Rng</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Seed" title="Seed">Seed</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_seed" title="from_seed">from_seed</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.from_entropy" title="from_entropy">from_entropy</a></li><li><a href="#method.from_rng" title="from_rng">from_rng</a></li><li><a href="#method.seed_from_u64" title="seed_from_u64">seed_from_u64</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-SeedableRng-for-ChaCha12Core" title="ChaCha12Core">ChaCha12Core</a></li><li><a href="#impl-SeedableRng-for-ChaCha12Rng" title="ChaCha12Rng">ChaCha12Rng</a></li><li><a href="#impl-SeedableRng-for-ChaCha20Core" title="ChaCha20Core">ChaCha20Core</a></li><li><a href="#impl-SeedableRng-for-ChaCha20Rng" title="ChaCha20Rng">ChaCha20Rng</a></li><li><a href="#impl-SeedableRng-for-ChaCha8Core" title="ChaCha8Core">ChaCha8Core</a></li><li><a href="#impl-SeedableRng-for-ChaCha8Rng" title="ChaCha8Rng">ChaCha8Rng</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In bdk_<wbr>chain::<wbr>bitcoin::<wbr>secp256k1::<wbr>rand</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../../../index.html">bdk_chain</a>::<wbr><a href="../../index.html">bitcoin</a>::<wbr><a href="../index.html">secp256k1</a>::<wbr><a href="index.html">rand</a></span><h1>Trait <span class="trait">SeedableRng</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#246">Source</a> </span></div><pre class="rust item-decl"><code>pub trait SeedableRng: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
2 type <a href="#associatedtype.Seed" class="associatedtype">Seed</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]>;
5 fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: Self::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> Self;
8 fn <a href="#method.seed_from_u64" class="fn">seed_from_u64</a>(state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> Self { ... }
9 <span class="item-spacer"></span> fn <a href="#method.from_rng" class="fn">from_rng</a><R>(rng: R) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>>
10 <span class="where">where R: <a class="trait" href="trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a></span> { ... }
11 <span class="item-spacer"></span> fn <a href="#method.from_entropy" class="fn">from_entropy</a>() -> Self { ... }
12 }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A random number generator that can be explicitly seeded.</p>
13 <p>This trait encapsulates the low-level functionality common to all
14 pseudo-random number generators (PRNGs, or algorithmic generators).</p>
15 </div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Seed" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#292">Source</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsMut.html" title="trait core::convert::AsMut">AsMut</a><[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]></h4></section></summary><div class="docblock"><p>Seed type, which is restricted to types mutably-dereferenceable as <code>u8</code>
16 arrays (we recommend <code>[u8; N]</code> for some <code>N</code>).</p>
17 <p>It is recommended to seed PRNGs with a seed of at least circa 100 bits,
18 which means an array of <code>[u8; 12]</code> or greater to avoid picking RNGs with
19 partially overlapping periods.</p>
20 <p>For cryptographic RNG’s a seed of 256 bits is recommended, <code>[u8; 32]</code>.</p>
21 <h5 id="implementing-seedablerng-for-rngs-with-large-seeds"><a class="doc-anchor" href="#implementing-seedablerng-for-rngs-with-large-seeds">§</a>Implementing <code>SeedableRng</code> for RNGs with large seeds</h5>
22 <p>Note that the required traits <code>core::default::Default</code> and
23 <code>core::convert::AsMut<u8></code> are not implemented for large arrays
24 <code>[u8; N]</code> with <code>N</code> > 32. To be able to implement the traits required by
25 <code>SeedableRng</code> for RNGs with such large seeds, the newtype pattern can be
28 <div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>rand_core::SeedableRng;
30 <span class="kw">const </span>N: usize = <span class="number">64</span>;
31 <span class="kw">pub struct </span>MyRngSeed(<span class="kw">pub </span>[u8; N]);
32 <span class="kw">pub struct </span>MyRng(MyRngSeed);
34 <span class="kw">impl </span>Default <span class="kw">for </span>MyRngSeed {
35 <span class="kw">fn </span>default() -> MyRngSeed {
36 MyRngSeed([<span class="number">0</span>; N])
40 <span class="kw">impl </span>AsMut<[u8]> <span class="kw">for </span>MyRngSeed {
41 <span class="kw">fn </span>as_mut(<span class="kw-2">&mut </span><span class="self">self</span>) -> <span class="kw-2">&mut </span>[u8] {
42 <span class="kw-2">&mut </span><span class="self">self</span>.<span class="number">0
46 <span class="kw">impl </span>SeedableRng <span class="kw">for </span>MyRng {
47 <span class="kw">type </span>Seed = MyRngSeed;
49 <span class="kw">fn </span>from_seed(seed: MyRngSeed) -> MyRng {
53 </div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.from_seed" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#319">Source</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: Self::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> Self</h4></section></summary><div class="docblock"><p>Create a new PRNG using the given seed.</p>
54 <p>PRNG implementations are allowed to assume that bits in the seed are
55 well distributed. That means usually that the number of one and zero
56 bits are roughly equal, and values like 0, 1 and (size - 1) are unlikely.
57 Note that many non-cryptographic PRNGs will show poor quality output
58 if this is not adhered to. If you wish to seed from simple numbers, use
59 <code>seed_from_u64</code> instead.</p>
60 <p>All PRNG implementations should be reproducible unless otherwise noted:
61 given a fixed <code>seed</code>, the same sequence of output should be produced
62 on all runs, library versions and architectures (e.g. check endianness).
63 Any “value-breaking” changes to the generator should require bumping at
64 least the minor version and documentation of the change.</p>
65 <p>It is not required that this function yield the same state as a
66 reference implementation of the PRNG given equivalent seed; if necessary
67 another constructor replicating behaviour from a reference
68 implementation can be added.</p>
69 <p>PRNG implementations should make sure <code>from_seed</code> never panics. In the
70 case that some special values (like an all zero seed) are not viable
71 seeds it is preferable to map these to alternative constant value(s),
72 for example <code>0xBAD5EEDu32</code> or <code>0x0DDB1A5E5BAD5EEDu64</code> (“odd biases? bad
73 seed”). This is assuming only a small number of values must be rejected.</p>
74 </div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.seed_from_u64" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#335">Source</a><h4 class="code-header">fn <a href="#method.seed_from_u64" class="fn">seed_from_u64</a>(state: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> Self</h4></section></summary><div class="docblock"><p>Create a new PRNG using a <code>u64</code> seed.</p>
75 <p>This is a convenience-wrapper around <code>from_seed</code> to allow construction
76 of any <code>SeedableRng</code> from a simple <code>u64</code> value. It is designed such that
77 low Hamming Weight numbers like 0 and 1 can be used and should still
78 result in good, independent seeds to the PRNG which is returned.</p>
79 <p>This <strong>is not suitable for cryptography</strong>, as should be clear given that
80 the input size is only 64 bits.</p>
81 <p>Implementations for PRNGs <em>may</em> provide their own implementations of
82 this function, but the default implementation should be good enough for
83 all purposes. <em>Changing</em> the implementation of this function should be
84 considered a value-breaking change.</p>
85 </div></details><details class="toggle method-toggle" open><summary><section id="method.from_rng" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#390">Source</a><h4 class="code-header">fn <a href="#method.from_rng" class="fn">from_rng</a><R>(rng: R) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, <a class="struct" href="struct.Error.html" title="struct bdk_chain::bitcoin::secp256k1::rand::Error">Error</a>><div class="where">where
86 R: <a class="trait" href="trait.RngCore.html" title="trait bdk_chain::bitcoin::secp256k1::rand::RngCore">RngCore</a>,</div></h4></section></summary><div class="docblock"><p>Create a new PRNG seeded from another <code>Rng</code>.</p>
87 <p>This may be useful when needing to rapidly seed many PRNGs from a master
88 PRNG, and to allow forking of PRNGs. It may be considered deterministic.</p>
89 <p>The master PRNG should be at least as high quality as the child PRNGs.
90 When seeding non-cryptographic child PRNGs, we recommend using a
91 different algorithm for the master PRNG (ideally a CSPRNG) to avoid
92 correlations between the child PRNGs. If this is not possible (e.g.
93 forking using small non-crypto PRNGs) ensure that your PRNG has a good
94 mixing function on the output or consider use of a hash function with
95 <code>from_seed</code>.</p>
96 <p>Note that seeding <code>XorShiftRng</code> from another <code>XorShiftRng</code> provides an
97 extreme example of what can go wrong: the new PRNG will be a clone
99 <p>PRNG implementations are allowed to assume that a good RNG is provided
100 for seeding, and that it is cryptographically secure when appropriate.
101 As of <code>rand</code> 0.7 / <code>rand_core</code> 0.5, implementations overriding this
102 method should ensure the implementation satisfies reproducibility
103 (in prior versions this was not required).</p>
104 </div></details><details class="toggle method-toggle" open><summary><section id="method.from_entropy" class="method"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/lib.rs.html#412">Source</a><h4 class="code-header">fn <a href="#method.from_entropy" class="fn">from_entropy</a>() -> Self</h4></section></summary><div class="docblock"><p>Creates a new instance of the RNG seeded via <a href="https://docs.rs/getrandom"><code>getrandom</code></a>.</p>
105 <p>This method is the recommended way to construct non-deterministic PRNGs
106 since it is convenient and secure.</p>
107 <p>In case the overhead of using <a href="https://docs.rs/getrandom"><code>getrandom</code></a> to seed <em>many</em> PRNGs is an
108 issue, one may prefer to seed from a local PRNG, e.g.
109 <code>from_rng(thread_rng()).unwrap()</code>.</p>
110 <h5 id="panics"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
111 <p>If <a href="https://docs.rs/getrandom"><code>getrandom</code></a> is unable to provide secure entropy this method will panic.</p>
112 </div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha8Core" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#impl-SeedableRng-for-ChaCha8Core" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Core.html" title="struct rand_chacha::chacha::ChaCha8Core">ChaCha8Core</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-1" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#associatedtype.Seed-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.from_seed" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Core.html" title="struct rand_chacha::chacha::ChaCha8Core">ChaCha8Core</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Core.html" title="struct rand_chacha::chacha::ChaCha8Core">ChaCha8Core</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha8Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#impl-SeedableRng-for-ChaCha8Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Rng.html" title="struct rand_chacha::chacha::ChaCha8Rng">ChaCha8Rng</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-2" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#associatedtype.Seed-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed-1" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#345">Source</a><a href="#method.from_seed-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Rng.html" title="struct rand_chacha::chacha::ChaCha8Rng">ChaCha8Rng</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha8Rng.html" title="struct rand_chacha::chacha::ChaCha8Rng">ChaCha8Rng</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha12Core" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#impl-SeedableRng-for-ChaCha12Core" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Core.html" title="struct rand_chacha::chacha::ChaCha12Core">ChaCha12Core</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-3" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#associatedtype.Seed-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed-2" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.from_seed-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Core.html" title="struct rand_chacha::chacha::ChaCha12Core">ChaCha12Core</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Core.html" title="struct rand_chacha::chacha::ChaCha12Core">ChaCha12Core</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha12Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#impl-SeedableRng-for-ChaCha12Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-4" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#associatedtype.Seed-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed-3" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#344">Source</a><a href="#method.from_seed-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha20Core" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#impl-SeedableRng-for-ChaCha20Core" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Core.html" title="struct rand_chacha::chacha::ChaCha20Core">ChaCha20Core</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-5" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#associatedtype.Seed-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed-4" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.from_seed-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Core.html" title="struct rand_chacha::chacha::ChaCha20Core">ChaCha20Core</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Core.html" title="struct rand_chacha::chacha::ChaCha20Core">ChaCha20Core</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-ChaCha20Rng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#impl-SeedableRng-for-ChaCha20Rng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Rng.html" title="struct rand_chacha::chacha::ChaCha20Rng">ChaCha20Rng</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-6" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#associatedtype.Seed-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.array.html">32</a>]</h4></section><section id="method.from_seed-5" class="method trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_chacha/chacha.rs.html#343">Source</a><a href="#method.from_seed-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_seed" class="fn">from_seed</a>(seed: <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Rng.html" title="struct rand_chacha::chacha::ChaCha20Rng">ChaCha20Rng</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a>) -> <a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha20Rng.html" title="struct rand_chacha::chacha::ChaCha20Rng">ChaCha20Rng</a></h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-StdRng" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/std.rs.html#58">Source</a><a href="#impl-SeedableRng-for-StdRng" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="rngs/struct.StdRng.html" title="struct bdk_chain::bitcoin::secp256k1::rand::rngs::StdRng">StdRng</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-7" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand/rngs/std.rs.html#59">Source</a><a href="#associatedtype.Seed-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = <<a class="struct" href="https://rust-random.github.io/rand/rand_chacha/chacha/struct.ChaCha12Rng.html" title="struct rand_chacha::chacha::ChaCha12Rng">ChaCha12Rng</a> as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-BlockRng64%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#412">Source</a><a href="#impl-SeedableRng-for-BlockRng64%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_core/block/struct.BlockRng64.html" title="struct rand_core::block::BlockRng64">BlockRng64</a><R><div class="where">where
113 R: <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a> + <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-8" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#413">Source</a><a href="#associatedtype.Seed-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = <R as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-SeedableRng-for-BlockRng%3CR%3E" class="impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#243">Source</a><a href="#impl-SeedableRng-for-BlockRng%3CR%3E" class="anchor">§</a><h3 class="code-header">impl<R> <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a> for <a class="struct" href="https://rust-random.github.io/rand/rand_core/block/struct.BlockRng.html" title="struct rand_core::block::BlockRng">BlockRng</a><R><div class="where">where
114 R: <a class="trait" href="https://rust-random.github.io/rand/rand_core/block/trait.BlockRngCore.html" title="trait rand_core::block::BlockRngCore">BlockRngCore</a> + <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Seed-9" class="associatedtype trait-impl"><a class="src rightside" href="https://rust-random.github.io/rand/src/rand_core/block.rs.html#244">Source</a><a href="#associatedtype.Seed-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Seed" class="associatedtype">Seed</a> = <R as <a class="trait" href="trait.SeedableRng.html" title="trait bdk_chain::bitcoin::secp256k1::rand::SeedableRng">SeedableRng</a>>::<a class="associatedtype" href="trait.SeedableRng.html#associatedtype.Seed" title="type bdk_chain::bitcoin::secp256k1::rand::SeedableRng::Seed">Seed</a></h4></section></div></details></div><script src="../../../../trait.impl/rand_core/trait.SeedableRng.js" data-ignore-extern-crates="rand,rand_core,rand_chacha" async></script></section></div></main></body></html>