/usr/share/doc/libghc-cryptohash-doc/html/Crypto-MAC.html is in libghc-cryptohash-doc 0.11.9-4build7.
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 | <!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.MAC</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Crypto-MAC.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Crypto-MAC.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">cryptohash-0.11.9: collection of crypto hashes, fast, pure and practical</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>unknown</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Crypto.MAC</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">MAC algorithms</a><ul><li><a href="#g:2">Incremental MAC algorithms</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Crypto hash generic MAC (Message Authentification Code) module</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">newtype</span> <a href="#t:HMAC">HMAC</a> a = <a href="#v:HMAC">HMAC</a> {<ul class="subs"><li><a href="#v:hmacGetDigest">hmacGetDigest</a> :: <a href="Crypto-Hash-Types.html#t:Digest">Digest</a> a</li></ul>}</li><li class="src short"><a href="#v:hmac">hmac</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a</li><li class="src short"><a href="#v:hmacAlg">hmacAlg</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:HMACContext">HMACContext</a> hashalg</li><li class="src short"><a href="#v:hmacInit">hmacInit</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</li><li class="src short"><a href="#v:hmacInitAlg">hmacInitAlg</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</li><li class="src short"><a href="#v:hmacUpdate">hmacUpdate</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</li><li class="src short"><a href="#v:hmacFinalize">hmacFinalize</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a</li></ul></div><div id="interface"><h1 id="g:1">MAC algorithms</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:HMAC" class="def">HMAC</a> a <a href="src/Crypto-Hash.html#HMAC" class="link">Source</a> <a href="#t:HMAC" class="selflink">#</a></p><div class="doc"><p>Represent an HMAC that is a phantom type with the hash used to produce the mac.</p><p>The Eq instance is constant time.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:HMAC" class="def">HMAC</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:hmacGetDigest" class="def">hmacGetDigest</a> :: <a href="Crypto-Hash-Types.html#t:Digest">Digest</a> a</dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:HMAC" class="caption collapser" onclick="toggleSection('i:HMAC')">Instances</p><div id="section.i:HMAC" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:HMAC:Eq:1" class="instance expander" onclick="toggleSection('i:id:HMAC:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Crypto-MAC.html#t:HMAC">HMAC</a> a)</span> <a href="src/Crypto-Hash.html#line-202" class="link">Source</a> <a href="#t:HMAC" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:HMAC:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:HMAC:Byteable:2" class="instance expander" onclick="toggleSection('i:id:HMAC:Byteable:2')"></span> <a href="file:///usr/share/doc/libghc-byteable-doc/html/Data-Byteable.html#t:Byteable">Byteable</a> (<a href="Crypto-MAC.html#t:HMAC">HMAC</a> a)</span> <a href="src/Crypto-Hash.html#line-199" class="link">Source</a> <a href="#t:HMAC" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:HMAC:Byteable:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toBytes">toBytes</a> :: <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="#v:toBytes" class="selflink">#</a></p><p class="src"><a href="#v:byteableLength">byteableLength</a> :: <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:byteableLength" class="selflink">#</a></p><p class="src"><a href="#v:withBytePtr">withBytePtr</a> :: <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> b) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> b <a href="#v:withBytePtr" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:hmac" class="def">hmac</a> <a href="src/Crypto-Hash.html#hmac" class="link">Source</a> <a href="#v:hmac" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Secret key</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Message to MAC</p></td></tr><tr><td class="src">-> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>compute a MAC using the supplied hashing function</p></div></div><div class="top"><p class="src"><a id="v:hmacAlg" class="def">hmacAlg</a> <a href="src/Crypto-Hash.html#hmacAlg" class="link">Source</a> <a href="#v:hmacAlg" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> a</td><td class="doc"><p>the hash algorithm the actual value is unused.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Secret key</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Message to MAC</p></td></tr><tr><td class="src">-> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>compute a HMAC using a specified algorithm</p></div></div><h2 id="g:2">Incremental MAC algorithms</h2><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:HMACContext" class="def">HMACContext</a> hashalg <a href="src/Crypto-MAC.html#HMACContext" class="link">Source</a> <a href="#t:HMACContext" class="selflink">#</a></p><div class="doc"><p>Represent an ongoing HMAC state, that can be appended with <code><a href="Crypto-MAC.html#v:hmacUpdate">hmacUpdate</a></code>
and finalize to an HMAC with <code><a href="Crypto-MAC.html#v:hmacFinalize">hmacFinalize</a></code></p></div></div><div class="top"><p class="src"><a id="v:hmacInit" class="def">hmacInit</a> <a href="src/Crypto-MAC.html#hmacInit" class="link">Source</a> <a href="#v:hmacInit" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Secret key</p></td></tr><tr><td class="src">-> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Initialize a new incremental HMAC context</p></div></div><div class="top"><p class="src"><a id="v:hmacInitAlg" class="def">hmacInitAlg</a> <a href="src/Crypto-MAC.html#hmacInitAlg" class="link">Source</a> <a href="#v:hmacInitAlg" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> a</td><td class="doc"><p>the hash algorithm the actual value is unused.</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Secret key</p></td></tr><tr><td class="src">-> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Initialize a new incremental HMAC context with a given hash algorithm.</p></div></div><div class="top"><p class="src"><a id="v:hmacUpdate" class="def">hmacUpdate</a> <a href="src/Crypto-MAC.html#hmacUpdate" class="link">Source</a> <a href="#v:hmacUpdate" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Message to Mac</p></td></tr><tr><td class="src">-> <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Incrementally update a HMAC context</p></div></div><div class="top"><p class="src"><a id="v:hmacFinalize" class="def">hmacFinalize</a> :: <a href="Crypto-Hash.html#t:HashAlgorithm">HashAlgorithm</a> a => <a href="Crypto-MAC.html#t:HMACContext">HMACContext</a> a -> <a href="Crypto-MAC.html#t:HMAC">HMAC</a> a <a href="src/Crypto-MAC.html#hmacFinalize" class="link">Source</a> <a href="#v:hmacFinalize" class="selflink">#</a></p><div class="doc"><p>Finalize a HMAC context and return the HMAC.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|