123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title><GChecksum>: </title>
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
- <link rel="home" href="index.html" title="">
- <link rel="up" href="ch01.html" title="GLib">
- <link rel="prev" href="re05.html" title="<GBytes>">
- <link rel="next" href="re07.html" title="<%GLibChecksumType>">
- <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
- <link rel="stylesheet" href="style.css" type="text/css">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
- <td width="100%" align="left" class="shortcuts"></td>
- <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
- <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
- <td><a accesskey="p" href="re05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
- <td><a accesskey="n" href="re07.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
- </tr></table>
- <div class="refentry">
- <a name="id-1.1.7"></a><div class="titlepage"></div>
- <div class="refnamediv">
- <h2><GChecksum></h2>
- <p><GChecksum></p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.7.2"></a><h2>Description</h2>
- <p>An opaque structure representing a checksumming operation.
- </p>
- <p>To create a new GChecksum, use <code class="function">g_checksum_new()</code>. To free
- a GChecksum, use <code class="function">g_checksum_free()</code>.</p>
- </div>
- <div class="refsect1">
- <a name="id-1.1.7.3"></a><h2>Functions</h2>
- <div class="refsect2">
- <a name="id-1.1.7.3.2"></a><h3>copy</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:copy self))
- </pre></div>
- <p>Copies a <span class="type">GChecksum</span>. If <em class="parameter"><code>checksum</code></em> has been closed, by calling
- <code class="function">g_checksum_get_string()</code> or <code class="function">g_checksum_get_digest()</code>, the copied
- checksum will be closed as well.</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.2.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum</p></td>
- <td class="parameter_description">
- <p>the <span class="type">GChecksum</span> to copy</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.3"></a><h3>free</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (checksum:free self))
- </pre></div>
- <p>Frees the memory allocated for <em class="parameter"><code>checksum</code></em>.</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.3.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GChecksum</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.4"></a><h3>get-string</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:get-string self))
- </pre></div>
- <p>Gets the digest as a hexadecimal string.
- </p>
- <p>Once this function has been called the <span class="type">GChecksum</span> can no longer be
- updated with <code class="function">g_checksum_update()</code>.
- </p>
- <p>The hexadecimal characters will be lower case.</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.4.6"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GChecksum</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.5"></a><h3>reset</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (checksum:reset self))
- </pre></div>
- <p>Resets the state of the <em class="parameter"><code>checksum</code></em> back to its initial state.</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.5.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum</p></td>
- <td class="parameter_description">
- <p>the <span class="type">GChecksum</span> to reset</p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.6"></a><h3>update</h3>
- <div class="informalexample"><pre class="programlisting">(define-values () (checksum:update self data))
- </pre></div>
- <p>Feeds <em class="parameter"><code>data</code></em> into an existing <span class="type">GChecksum</span>. The checksum must still be
- open, that is <code class="function">g_checksum_get_string()</code> or <code class="function">g_checksum_get_digest()</code> must
- not have been called on <em class="parameter"><code>checksum</code></em>.</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.6.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table>
- <tr>
- <td class="parameter_name"><p>checksum</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GChecksum</span></p>
- <p>Passed as <code class="code">self</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>data</p></td>
- <td class="parameter_description">
- <p>buffer used to compute the checksum</p>
- <p>Passed as <code class="code">data</code></p>
- </td>
- </tr>
- <tr>
- <td class="parameter_name"><p>length</p></td>
- <td class="parameter_description">
- <p>size of the buffer, or -1 if it is a null-terminated string.</p>
- <p>Inferred from <code class="code">data</code></p>
- </td>
- </tr>
- </table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.7"></a><h3>checksum:new</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:new checksum-type))
- </pre></div>
- <p>Undocumented</p>
- <div class="refsect3">
- <a name="id-1.1.7.3.7.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum_type</p></td>
- <td class="parameter_description">
- <p></p>
- <p>Passed as <code class="code">checksum-type</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- <div class="refsect2">
- <a name="id-1.1.7.3.8"></a><h3>checksum:type-get-length</h3>
- <div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:type-get-length checksum-type))
- </pre></div>
- <p>Gets the length in bytes of digests of type <em class="parameter"><code>checksum_type</code></em></p>
- <div class="refsect3">
- <a name="id-1.1.7.3.8.4"></a><h4>Parameters</h4>
- <div class="informaltable"><table><tr>
- <td class="parameter_name"><p>checksum_type</p></td>
- <td class="parameter_description">
- <p>a <span class="type">GChecksumType</span></p>
- <p>Passed as <code class="code">checksum-type</code></p>
- </td>
- </tr></table></div>
- </div>
- </div>
- </div>
- </div>
- <div class="footer">
- <hr>Generated by GTK-Doc V1.33.1</div>
- </body>
- </html>
|