Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 470a9c4d9431de9d1d735f6d02b6859e > files > 23

ocaml-sha-devel-1.9-3.mga5.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Sha1.html">
<link rel="next" href="Sha512.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Sha1" rel="Chapter" href="Sha1.html">
<link title="Sha256" rel="Chapter" href="Sha256.html">
<link title="Sha512" rel="Chapter" href="Sha512.html"><title>Sha256</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Sha1.html" title="Sha1">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Sha512.html" title="Sha512">Next</a>
</div>
<h1>Module <a href="type_Sha256.html">Sha256</a></h1>

<pre><span class="keyword">module</span> Sha256: <code class="code">sig</code> <a href="Sha256.html">..</a> <code class="code">end</code></pre><div class="info module top">
SHA256 OCaml binding<br>
</div>
<hr width="100%">

<pre><span id="TYPEctx"><span class="keyword">type</span> <code class="type"></code>ctx</span> </pre>
<div class="info ">
context type - opaque<br>
</div>


<pre><span id="TYPEbuf"><span class="keyword">type</span> <code class="type"></code>buf</span> = <code class="type">(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t</code> </pre>
<div class="info ">
buffer type<br>
</div>


<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
<div class="info ">
digest type - opaque<br>
</div>


<pre><span id="VALzero"><span class="keyword">val</span> zero</span> : <code class="type"><a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
The zero digest<br>
</div>

<pre><span id="VALinit"><span class="keyword">val</span> init</span> : <code class="type">unit -> <a href="Sha256.html#TYPEctx">ctx</a></code></pre><div class="info ">
Create a new context<br>
</div>

<pre><span id="VALunsafe_update_substring"><span class="keyword">val</span> unsafe_update_substring</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> string -> int -> int -> unit</code></pre><div class="info ">
Sha256.unsafe_update_substring ctx s ofs len updates the context
    with the substring of s starting at character number ofs and
    containing len characters. Unsafe: No range checking!<br>
</div>

<pre><span id="VALupdate_substring"><span class="keyword">val</span> update_substring</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> string -> int -> int -> unit</code></pre><div class="info ">
Sha256.update_substring ctx s ofs len updates the context with the
    substring of s starting at character number ofs and containing len
    characters.<br>
</div>

<pre><span id="VALupdate_string"><span class="keyword">val</span> update_string</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> string -> unit</code></pre><div class="info ">
Sha256.update_string ctx s updates the context with s.<br>
</div>

<pre><span id="VALupdate_buffer"><span class="keyword">val</span> update_buffer</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> <a href="Sha256.html#TYPEbuf">buf</a> -> unit</code></pre><div class="info ">
Sha256.update_buffer ctx a updates the context with a.
    Runs parallel to other threads if any exist.<br>
</div>

<pre><span id="VALfinalize"><span class="keyword">val</span> finalize</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Finalize the context and return digest<br>
</div>

<pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type"><a href="Sha256.html#TYPEctx">ctx</a> -> <a href="Sha256.html#TYPEctx">ctx</a></code></pre><div class="info ">
Return an copy of the context<br>
</div>

<pre><span id="VALstring"><span class="keyword">val</span> string</span> : <code class="type">string -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Return the digest of the given string.<br>
</div>

<pre><span id="VALsubstring"><span class="keyword">val</span> substring</span> : <code class="type">string -> int -> int -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Sha256.substring s ofs len returns the digest of the substring of s starting
at character number ofs and containing len characters.<br>
</div>

<pre><span id="VALbuffer"><span class="keyword">val</span> buffer</span> : <code class="type"><a href="Sha256.html#TYPEbuf">buf</a> -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Return the digest of the given buffer.<br>
</div>

<pre><span id="VALchannel"><span class="keyword">val</span> channel</span> : <code class="type">Pervasives.in_channel -> int -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
If len is nonnegative, Sha256.channel ic len reads len characters from
channel ic and returns their digest, or raises End_of_file if end-of-file is
reached before len characters are read. If len is negative, Sha256.channel ic
len reads all characters from ic until end-of-file is reached and return their
digest.<br>
</div>

<pre><span id="VALfile"><span class="keyword">val</span> file</span> : <code class="type">string -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Return the digest of the file whose name is given.<br>
</div>

<pre><span id="VALfile_fast"><span class="keyword">val</span> file_fast</span> : <code class="type">string -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Return the digest of the file whose name is given using fast C function<br>
</div>

<pre><span id="VALoutput"><span class="keyword">val</span> output</span> : <code class="type">Pervasives.out_channel -> <a href="Sha256.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
Write a digest on the given output channel.<br>
</div>

<pre><span id="VALinput"><span class="keyword">val</span> input</span> : <code class="type">Pervasives.in_channel -> <a href="Sha256.html#TYPEt">t</a></code></pre><div class="info ">
Read a digest from the given input channel.<br>
</div>

<pre><span id="VALto_bin"><span class="keyword">val</span> to_bin</span> : <code class="type"><a href="Sha256.html#TYPEt">t</a> -> string</code></pre><div class="info ">
return a binary representation of the given digest<br>
</div>

<pre><span id="VALto_hex"><span class="keyword">val</span> to_hex</span> : <code class="type"><a href="Sha256.html#TYPEt">t</a> -> string</code></pre><div class="info ">
return a printable hexadecimal representation of the given digest<br>
</div>
</body></html>