From 209d2a0cda742e5de9a836dceaaef55833b461c4 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 19 Aug 2010 16:32:19 -0600 Subject: [PATCH] Documenting md5 feature --- collects/file/scribblings/md5.scrbl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/file/scribblings/md5.scrbl b/collects/file/scribblings/md5.scrbl index 5fc7dd2b55..2e790e4278 100644 --- a/collects/file/scribblings/md5.scrbl +++ b/collects/file/scribblings/md5.scrbl @@ -10,12 +10,15 @@ @defmodule[file/md5] -@defproc[(md5 [in (or/c input-port? bytes? string?)]) bytes?]{ +@defproc[(md5 [in (or/c input-port? bytes? string?)] + [hex-encode? boolean? #t]) bytes?]{ -Produces a byte string containing 32 hexadecimal digits (lowercase) +If @racket[hex-encode?] is @racket[#t], produces a byte string containing 32 hexadecimal digits (lowercase) +that is the MD5 hash of the given input stream or byte string. Otherwise produces the 16 byte long byte string that is the MD5 hash of the given input stream or byte string. @examples[ #:eval md5-eval (md5 #"abc") +(md5 #"abc" #f) ]}