From a764f20375fe5e193250e8cacf4762aa78621f32 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Sat, 2 Mar 2013 19:41:24 -0500 Subject: [PATCH] Minor sha1 doc fixes --- collects/file/scribblings/sha1.scrbl | 10 +++++++--- collects/openssl/openssl.scrbl | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/collects/file/scribblings/sha1.scrbl b/collects/file/scribblings/sha1.scrbl index 6863d57f48..d1a648c864 100644 --- a/collects/file/scribblings/sha1.scrbl +++ b/collects/file/scribblings/sha1.scrbl @@ -10,7 +10,7 @@ See @racketmodname[openssl/sha1] for a faster implementation. -@defproc[(sha1 [in input-port]) string?]{ +@defproc[(sha1 [in input-port?]) string?]{ Returns a 40-character string that represents the SHA-1 hash (in hexadecimal notation) of the content from @racket[in], consuming all @@ -24,7 +24,7 @@ The @racket[sha1] function composes @racket[bytes->hex-string] with (sha1 (open-input-bytes #"abc")) ]} -@defproc[(sha1-bytes [in input-port]) bytes?]{ +@defproc[(sha1-bytes [in input-port?]) bytes?]{ Returns a 20-byte byte string that represents the SHA-1 hash of the content from @racket[in], consuming all of the input from @racket[in] @@ -39,7 +39,11 @@ until an end-of-file. Converts the given byte string to a string representation, where each byte in @racket[bstr] is converted to its two-digit hexadecimal -representation in the resulting string.} +representation in the resulting string. +@examples[ +#:eval sha1-eval +(bytes->hex-string #"turtles") +]} @close-eval[sha1-eval] diff --git a/collects/openssl/openssl.scrbl b/collects/openssl/openssl.scrbl index c195f92e43..0bd34da293 100644 --- a/collects/openssl/openssl.scrbl +++ b/collects/openssl/openssl.scrbl @@ -629,7 +629,7 @@ functions. If the OpenSSL library cannot be opened, this library logs a warning and falls back to the implementation in @racketmodname[file/sha1].} -@defproc[(sha1 [in input-port]) string?]{ +@defproc[(sha1 [in input-port?]) string?]{ Returns a 40-character string that represents the SHA-1 hash (in hexadecimal notation) of the content from @racket[in], consuming all @@ -638,7 +638,7 @@ of the input from @racket[in] until an end-of-file. The @racket[sha1] function composes @racket[bytes->hex-string] with @racket[sha1-bytes].} -@defproc[(sha1-bytes [in input-port]) bytes?]{ +@defproc[(sha1-bytes [in input-port?]) bytes?]{ Returns a 20-byte byte string that represents the SHA-1 hash of the content from @racket[in], consuming all of the input from @racket[in]