File: manual036.html

package info (click to toggle)
ocaml-doc 2.04-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,820 kB
  • ctags: 997
  • sloc: makefile: 38; sh: 12
file content (74 lines) | stat: -rw-r--r-- 2,327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset= ISO-8859-1">
<TITLE>
 Module Digest: MD5 message digest
</TITLE>
</HEAD>
<BODY >
<A HREF="manual035.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual037.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<A HREF="manual030.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<HR>

<H2>17.6&nbsp;&nbsp; Module <TT>Digest</TT>: MD5 message digest</H2><A NAME="s:Digest"></A>
<A NAME="@manual204"></A><BLOCKQUOTE>
This module provides functions to compute 128-bit ``digests'' of
arbitrary-length strings or files. The digests are of cryptographic
quality: it is very hard, given a digest, to forge a string having
that digest. The algorithm used is MD5. 
</BLOCKQUOTE>
<PRE>
type t = string
</PRE>
<BLOCKQUOTE>
The type of digests: 16-character strings. 
</BLOCKQUOTE>
<PRE>
val string: string -&gt; t
</PRE>
<A NAME="@manual205"></A><BLOCKQUOTE>
Return the digest of the given string. 
</BLOCKQUOTE>
<PRE>
val substring: string -&gt; int -&gt; int -&gt; t
</PRE>
<A NAME="@manual206"></A><BLOCKQUOTE>
<CODE>Digest.substring s ofs len</CODE> returns the digest of the substring
of <CODE>s</CODE> starting at character number <CODE>ofs</CODE> and containing <CODE>len</CODE>
characters. 
</BLOCKQUOTE>
<PRE>
val channel: in_channel -&gt; int -&gt; t
</PRE>
<A NAME="@manual207"></A><BLOCKQUOTE>
<CODE>Digest.channel ic len</CODE> reads <CODE>len</CODE> characters from channel <CODE>ic</CODE>
and returns their digest. 
</BLOCKQUOTE>
<PRE>
val file: string -&gt; t
</PRE>
<A NAME="@manual208"></A><BLOCKQUOTE>
Return the digest of the file whose name is given. 
</BLOCKQUOTE>
<PRE>
val output: out_channel -&gt; t -&gt; unit
</PRE>
<A NAME="@manual209"></A><BLOCKQUOTE>
Write a digest on the given output channel. 
</BLOCKQUOTE>
<PRE>
val input: in_channel -&gt; t
</PRE>
<A NAME="@manual210"></A><BLOCKQUOTE>
Read a digest from the given input channel. 
</BLOCKQUOTE>

<HR>
<A HREF="manual035.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual037.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<A HREF="manual030.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
</BODY>
</HTML>