summaryrefslogtreecommitdiff
path: root/stdlib/digest.mli
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2002-02-25 16:37:15 +0000
committerDamien Doligez <damien.doligez-inria.fr>2002-02-25 16:37:15 +0000
commitf3a1293b03bea85d83213abb8a8824d32f93d02f (patch)
tree129d4cfb359053bfebb5367dec680f46d304d49b /stdlib/digest.mli
parent5dd41d5bc92995a053e19e26b23c99c2a9fb5cac (diff)
downloadocaml-f3a1293b03bea85d83213abb8a8824d32f93d02f.tar.gz
Digest: modif channel, fix PR#924, ajout to_hex
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/digest.mli')
-rw-r--r--stdlib/digest.mli10
1 files changed, 8 insertions, 2 deletions
diff --git a/stdlib/digest.mli b/stdlib/digest.mli
index bbcf516045..342a3a4eaf 100644
--- a/stdlib/digest.mli
+++ b/stdlib/digest.mli
@@ -33,8 +33,12 @@ val substring : string -> int -> int -> t
characters. *)
external channel : in_channel -> int -> t = "md5_chan"
-(** [Digest.channel ic len] reads [len] characters from channel [ic]
- and returns their digest. *)
+(** If [len] is nonnegative, [Digest.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, [Digest.channel ic len] reads
+ characters from [ic] until end-of-file is reached and return their
+ digest. *)
val file : string -> t
(** Return the digest of the file whose name is given. *)
@@ -45,3 +49,5 @@ val output : out_channel -> t -> unit
val input : in_channel -> t
(** Read a digest from the given input channel. *)
+val to_hex : t -> string
+(** Return the printable hexadecimal representation of the given digest. *)