<trclass="memdesc:a16edb4e9c0a519cb423979b38d8f132a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">LFG buffer size (number of uint32 words in state). <br/></td></tr>
<trclass="memdesc:a2c4db3d8d295f706dcacc8a4d039beed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Number of uint32 words needed to seed the LFG. <br/></td></tr>
<trclass="memdesc:abc583da3bb66cab3eafc3496bc46e193"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initialize the LFG from a 17-word big-endian seed. <br/></td></tr>
<trclass="memdesc:a25e6df5ee051a324d943185f193d3418"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Generate count bytes of junk data into out. <br/></td></tr>
<trclass="memdesc:aef1434f019902caf30f1d4fe577267ba"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Try to extract the LFG seed from a chunk of data. <br/></td></tr>
<pclass="definition">Definition at line <aclass="el"href="lfg_8h_source.html#l00035">35</a> of file <aclass="el"href="lfg_8h_source.html">lfg.h</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="lfg_8c_source.html#l00036">lfg_backward()</a>, and <aclass="el"href="lfg_8c_source.html#l00029">lfg_forward()</a>.</p>
<p>LFG buffer size (number of uint32 words in state). </p>
<pclass="definition">Definition at line <aclass="el"href="lfg_8h_source.html#l00034">34</a> of file <aclass="el"href="lfg_8h_source.html">lfg.h</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="lfg_8c_source.html#l00036">lfg_backward()</a>, <aclass="el"href="lfg_8c_source.html#l00029">lfg_forward()</a>, <aclass="el"href="lfg_8c_source.html#l00048">lfg_initialize()</a>, <aclass="el"href="lfg_8c_source.html#l00103">lfg_reinitialize()</a>, <aclass="el"href="lfg_8c_source.html#l00082">ngc_lfg_get_bytes()</a>, and <aclass="el"href="lfg_8c_source.html#l00121">ngc_lfg_get_seed()</a>.</p>
<p>Number of uint32 words needed to seed the LFG. </p>
<pclass="definition">Definition at line <aclass="el"href="lfg_8h_source.html#l00036">36</a> of file <aclass="el"href="lfg_8h_source.html">lfg.h</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="lfg_8c_source.html#l00048">lfg_initialize()</a>, <aclass="el"href="lfg_8c_source.html#l00103">lfg_reinitialize()</a>, <aclass="el"href="lfg_8c_source.html#l00121">ngc_lfg_get_seed()</a>, <aclass="el"href="lfg_8c_source.html#l00073">ngc_lfg_set_seed()</a>, <aclass="el"href="ngcw__junk_8c_source.html#l00104">ngcw_deserialize_junk_map()</a>, <aclass="el"href="ngcw__junk_8c_source.html#l00154">ngcw_regenerate_junk_sector()</a>, <aclass="el"href="ngcw__junk_8c_source.html#l00075">ngcw_serialize_junk_map()</a>, and <aclass="el"href="read_8c_source.html#l00044">wii_reconstruct_group_junk()</a>.</p>
<p>Generate count bytes of junk data into out. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">ctx</td><td>LFG context (must be initialized via ngc_lfg_set_seed). </td></tr>
<tr><tdclass="paramname">out</td><td>Output buffer to fill. </td></tr>
<tr><tdclass="paramname">count</td><td>Number of bytes to generate. </td></tr>
</table>
</dd>
</dl>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<pclass="definition">Definition at line <aclass="el"href="lfg_8c_source.html#l00082">82</a> of file <aclass="el"href="lfg_8c_source.html">lfg.c</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="lfg_8c_source.html#l00082">ngc_lfg_get_bytes()</a>, <aclass="el"href="ngcw__junk_8c_source.html#l00154">ngcw_regenerate_junk_sector()</a>, and <aclass="el"href="read_8c_source.html#l00044">wii_reconstruct_group_junk()</a>.</p>
<p>Try to extract the LFG seed from a chunk of data. </p>
<p>Attempts to reverse-engineer the 17-word seed from a buffer of suspected PRNG output. Requires at least NGC_LFG_K * 4 = 2084 bytes of contiguous PRNG output aligned to uint32 boundaries.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">data</td><td>Pointer to the data to test. </td></tr>
<tr><tdclass="paramname">size</td><td>Number of bytes available. </td></tr>
<tr><tdclass="paramname">data_offset</td><td>Byte offset of data[0] within its LFG block (0x8000-aligned for Wii, arbitrary for GC). </td></tr>
<tr><tdclass="paramname">seed_out</td><td>If successful, receives the 17-word seed (big-endian).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The number of consecutive bytes from data[0] that match the LFG. Returns 0 if the data does not look like junk. </dd></dl>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<p>< LFG buffer size (number of uint32 words in state).</p>
<pclass="definition">Definition at line <aclass="el"href="lfg_8c_source.html#l00121">121</a> of file <aclass="el"href="lfg_8c_source.html">lfg.c</a>.</p>
<p>Initialize the LFG from a 17-word big-endian seed. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">ctx</td><td>LFG context to initialize. </td></tr>
<tr><tdclass="paramname">seed</td><td>Array of 17 uint32 seed words (big-endian). </td></tr>
</table>
</dd>
</dl>
<p>< Number of uint32 words needed to seed the LFG.</p>
<pclass="definition">Definition at line <aclass="el"href="lfg_8c_source.html#l00073">73</a> of file <aclass="el"href="lfg_8c_source.html">lfg.c</a>.</p>
<pclass="reference">Referenced by <aclass="el"href="lfg_8c_source.html#l00073">ngc_lfg_set_seed()</a>, <aclass="el"href="ngcw__junk_8c_source.html#l00154">ngcw_regenerate_junk_sector()</a>, and <aclass="el"href="read_8c_source.html#l00044">wii_reconstruct_group_junk()</a>.</p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.18.0 </li>