5 MD5 Message Digest

▼ |  | File: Racket File Format Libraries

1 | gzip Compression and File Creation
2 | gzip Decompression
3 | zip File Creation
4 | tar File Creation
5 | MD5 Message Digest
6 | SHA1 Message Digest
7 | GIF File Writing
| Bibliography
| Index

On this page:

md5

top← prev up next →

### 5`` MD5 Message Digest

( require file/md5)

( md5 in [hex-encode?]) → bytes?
in : ( or/c input-port? bytes? string?)
hex-encode? : boolean? = #t

If hex-encode? is #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:
> ( md5 #"abc")
#"900150983cd24fb0d6963f7d28e17f72"
> ( md5 #"abc" #f)
#"\220\1P\230<\322O\260\326\226?}(\341\177r"

top← prev up next →