/usr/share/doc/libghc-crypto-random-doc/html/Crypto-Random-API.html is in libghc-crypto-random-doc 0.0.9-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Crypto.Random.API</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Crypto-Random-API.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Crypto-Random-API.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">crypto-random-0.0.9: Simple cryptographic random related types</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>Vincent Hanquez <vincent@snarc.org></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>Good</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Crypto.Random.API</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Deprecated interface for compatibility of crypto-random-api user
with crypto-random</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:CPRG">CPRG</a> gen <span class="keyword">where</span><ul class="subs"><li><a href="#v:cprgCreate">cprgCreate</a> :: <a href="Crypto-Random.html#t:EntropyPool">EntropyPool</a> -> gen</li><li><a href="#v:cprgSetReseedThreshold">cprgSetReseedThreshold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> gen</li><li><a href="#v:cprgFork">cprgFork</a> :: gen -> (gen, gen)</li><li><a href="#v:cprgGenerate">cprgGenerate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, gen)</li><li><a href="#v:cprgGenerateWithEntropy">cprgGenerateWithEntropy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, gen)</li></ul></li><li class="src short"><a href="#v:cprgGenBytes">cprgGenBytes</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> g -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, g)</li><li class="src short"><a href="#v:genRandomBytes">genRandomBytes</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> g -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, g)</li><li class="src short"><a href="#v:genRandomBytes-39-">genRandomBytes'</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> g -> ([<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>], g)</li><li class="src short"><a href="#v:withRandomBytes">withRandomBytes</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => g -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -> a) -> (a, g)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:CPRG" class="def">CPRG</a> gen <span class="keyword">where</span> <a href="src/Crypto-Random-Generator.html#CPRG" class="link">Source</a></p><div class="doc"><p>Cryptographic Pseudo Random Generator</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:cprgCreate" class="def">cprgCreate</a> :: <a href="Crypto-Random.html#t:EntropyPool">EntropyPool</a> -> gen <a href="src/Crypto-Random-Generator.html#cprgCreate" class="link">Source</a></p><div class="doc"><p>Create a new CPRG using an object of the CryptoGenerator class
and with an explicit reference to an EntropyPool.</p></div><p class="src"><a name="v:cprgSetReseedThreshold" class="def">cprgSetReseedThreshold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> gen <a href="src/Crypto-Random-Generator.html#cprgSetReseedThreshold" class="link">Source</a></p><div class="doc"><p>Give the ability to set a threshold of byte generated that after
being exceeded will result in a reseed with some stateful entropy
after a call to <code><a href="Crypto-Random-API.html#v:cprgGenerate">cprgGenerate</a></code></p><p>If this threshold is exceeded during the set operation, the
rng should be reseeded here.</p><p>If this value is set to 0, no reseeding will be done and the
output will be completely predicable. This is not a recommended
level except for debugging and testing purpose.</p></div><p class="src"><a name="v:cprgFork" class="def">cprgFork</a> :: gen -> (gen, gen) <a href="src/Crypto-Random-Generator.html#cprgFork" class="link">Source</a></p><div class="doc"><p>Fork a CPRG into a new independent CPRG.</p><p>As entropy is mixed to generate safely a new generator,
2 calls with the same CPRG will not produce the same output.</p></div><p class="src"><a name="v:cprgGenerate" class="def">cprgGenerate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, gen) <a href="src/Crypto-Random-Generator.html#cprgGenerate" class="link">Source</a></p><div class="doc"><p>Generate a number of bytes using the CPRG.</p><p>Given one CPRG, the generated bytes will always be the same.</p><p>However the returned CPRG might have been reseeded with entropy bits,
so 2 calls with the same CPRG will not necessarily result in the same next CPRG.</p></div><p class="src"><a name="v:cprgGenerateWithEntropy" class="def">cprgGenerateWithEntropy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> gen -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, gen) <a href="src/Crypto-Random-Generator.html#cprgGenerateWithEntropy" class="link">Source</a></p><div class="doc"><p>Similar to cprgGenerate except that the random data is mixed with pure entropy,
so the result is not reproducible after use, but it provides more guarantee,
theorically speaking, in term of the randomness generated.</p></div></div><div class="subs instances"><p id="control.i:CPRG" class="caption collapser" onclick="toggleSection('i:CPRG')">Instances</p><div id="section.i:CPRG" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Crypto-Random-API.html#t:CPRG">CPRG</a> <a href="Crypto-Random.html#t:SystemRNG">SystemRNG</a></span> <a href="src/Crypto-Random-Generator.html#line-46" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:cprgGenBytes" class="def">cprgGenBytes</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> g -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, g) <a href="src/Crypto-Random-API.html#cprgGenBytes" class="link">Source</a></p><div class="doc"><p>Generate bytes using the CPRG and the number specified.</p><p>For user of the API, it's recommended to use genRandomBytes
instead of this method directly. the CPRG need to be able
to supply at minimum 2^20 bytes at a time.</p></div></div><div class="top"><p class="src"><a name="v:genRandomBytes" class="def">genRandomBytes</a> <a href="src/Crypto-Random-API.html#genRandomBytes" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>number of bytes to return</p></td></tr><tr><td class="src">-> g</td><td class="doc"><p>CPRG to use</p></td></tr><tr><td class="src">-> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, g)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><div class="warning"><p>Deprecated: use cprgGenerate from Crypto.Random instead</p></div><p>Generate bytes using the cprg in parameter.</p><p>If the number of bytes requested is really high,
it's preferable to use <code><a href="Crypto-Random-API.html#v:genRandomBytes">genRandomBytes</a></code> for better memory efficiency.</p></div></div><div class="top"><p class="src"><a name="v:genRandomBytes-39-" class="def">genRandomBytes'</a> <a href="src/Crypto-Random-API.html#genRandomBytes%27" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>number of bytes to return</p></td></tr><tr><td class="src">-> g</td><td class="doc"><p>CPRG to use</p></td></tr><tr><td class="src">-> ([<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>], g)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generate bytes using the cprg in parameter.</p><p>This is not tail recursive and an excessive len (>= 2^29) parameter would
result in stack overflow.</p></div></div><div class="top"><p class="src"><a name="v:withRandomBytes" class="def">withRandomBytes</a> :: <a href="Crypto-Random-API.html#t:CPRG">CPRG</a> g => g -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -> a) -> (a, g) <a href="src/Crypto-Random.html#withRandomBytes" class="link">Source</a></p><div class="doc"><p>generate <code>len random bytes and mapped the bytes to the function </code>f.</p><p>This is equivalent to use Control.Arrow <code>first</code> with <code><a href="Crypto-Random-API.html#v:cprgGenerate">cprgGenerate</a></code></p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|