Changeset 35154 in project


Ignore:
Timestamp:
02/18/18 17:35:40 (7 months ago)
Author:
sjamaan
Message:

Add simple-md5 egg

Location:
release/4/simple-md5
Files:
1 added
4 deleted
1 edited
4 copied

Legend:

Unmodified
Added
Removed
  • release/4/simple-md5/trunk/simple-md5.meta

    r35142 r35154  
    11;;; md5.meta -*- Hen -*-
    22
    3 ((egg "md5.egg")
    4  (synopsis "Computes MD5 (RFC1321) checksums")
     3((synopsis "Computes MD5 (RFC1321) checksums, without dependencies")
    54 (category crypt)
    65 (author "Colin Plumb, packaged for Chicken by Peter Bex")
    7  (doc-from-wiki)
    86 (license "Public Domain")
    9  (depends (message-digest "3.4.0"))
    107 (test-depends test)
    11  (files "md5-base.c" "md5.meta" "md5.setup" "tests/run.scm" "md5.scm"))
     8 (files "md5-base.c" "simple-md5.meta" "simple-md5.setup" "tests/run.scm" "simple-md5.scm"))
  • release/4/simple-md5/trunk/simple-md5.scm

    r35142 r35154  
    11;;
    2 ;; md5 - Scheme wrapper for Colin Plumb's Public Domain md5 implementation
     2;; simple-md5 - Scheme wrapper for Colin Plumb's Public Domain md5 implementation, without dependencies
    33;;
    44;; All code in this egg is in the Public Domain
    5 (module md5
    6   (md5-primitive)
     5(module simple-md5 (string->md5sum file-md5sum)
    76
    87(import chicken scheme foreign)
    9 (use message-digest-primitive)
     8(use srfi-13 posix lolevel)
    109
    11 #>#include "md5-base.c"<#
    12 ;#>#include "md5-ssl.c"<# ;an alternative coding
     10(foreign-declare "#include \"md5-base.c\"")
    1311
    1412(define digest-length (foreign-value "MD5_DIGEST_SIZE" unsigned-int))
    15 (define block-length (foreign-value "MD5_BLOCK_SIZE" unsigned-int))
    1613(define context-size (foreign-value "sizeof(struct MD5Context)" unsigned-int))
    1714
    18 (define init (foreign-lambda void MD5Init c-pointer))
    19 (define update (foreign-lambda void MD5Update c-pointer scheme-pointer unsigned-int))
    20 (define final (foreign-lambda void MD5Final c-pointer scheme-pointer))
    21 (define raw-update (foreign-lambda void MD5Update c-pointer c-pointer unsigned-int))
     15(define init (foreign-lambda void MD5Init scheme-pointer))
     16(define update (foreign-lambda void MD5Update scheme-pointer scheme-pointer unsigned-int))
     17(define raw-update (foreign-lambda void MD5Update scheme-pointer c-pointer unsigned-int))
     18(define final (foreign-lambda void MD5Final scheme-pointer scheme-pointer))
    2219
    23 (define md5-primitive
    24   (let ((the-md5-primitive #f))
    25     (lambda ()
    26       (unless the-md5-primitive
    27         (set! the-md5-primitive
    28               (make-message-digest-primitive context-size digest-length
    29                                              init update final
    30                                              block-length 'md5-primitive
    31                                              raw-update)) )
    32       the-md5-primitive ) ) )
     20(define (string->md5sum str)
     21  (let ((str-size (string-length str))
     22        (ctxt (make-blob context-size))
     23        (digest (make-string digest-length)))
     24    (init ctxt)
     25    (unless (zero? str-size)
     26      (update ctxt str str-size))
     27    (final ctxt digest)
     28    (string-concatenate
     29     (map (lambda (c)
     30            (string-pad (number->string (char->integer c) 16) 2 #\0))
     31          (string->list digest)))))
     32
     33;; From simple-sha1
     34(cond-expand
     35  ((and windows (not cygwin))
     36   (begin
     37     (define read-into-buffer
     38       (foreign-lambda* bool ((int fd) (scheme-pointer buffer) (integer size))
     39         "C_return(read(fd, buffer, size) == size);"))
     40     (define (mapped-pointer fname fd size k)
     41       (let ((buffer (make-blob size)))
     42         (unless (read-into-buffer fd buffer size)
     43           (error 'sha1sum "can not read file" fname))
     44         (k (location buffer) void)))))
     45  (else
     46   (define (mapped-pointer fname fd size k)
     47     (let* ((mmap (map-file-to-memory #f size prot/read map/shared fd))
     48            (ptr (memory-mapped-file-pointer mmap)))
     49       (k ptr (cut unmap-file-from-memory mmap))))))
     50
     51
     52(define (file-md5sum fname)
     53  (and (file-exists? fname)
     54       (not (directory? fname))
     55       (let* ((fd (file-open fname open/rdonly))
     56              (fsize (file-size fd))
     57              (ctxt (make-blob context-size))
     58              (digest (make-string digest-length)))
     59         (init ctxt)
     60         (unless (zero? fsize)
     61           (mapped-pointer
     62            fname fd fsize
     63            (lambda (buffer cleanup)
     64              (raw-update ctxt buffer fsize)
     65              (cleanup))))
     66         (final ctxt digest)
     67         (file-close fd)
     68         (string-concatenate
     69          (map (lambda (c)
     70                 (string-pad (number->string (char->integer c) 16) 2 #\0))
     71               (string->list digest))))))
    3372)
  • release/4/simple-md5/trunk/simple-md5.setup

    r35142 r35154  
    1 (compile -s -O3 -d1 md5.scm -j md5)
    2 (compile -s -O3 -d0 md5.import.scm)
     1(compile -s -O3 -d1 simple-md5.scm -j simple-md5)
     2(compile -s -O3 -d0 simple-md5.import.scm)
    33
    44(install-extension
    5   'md5
    6   '("md5.so" "md5.import.so")
    7   `((version "3.2.0")))
     5  'simple-md5
     6  '("simple-md5.so" "simple-md5.import.so")
     7  `((version "0.0.1")))
  • release/4/simple-md5/trunk/tests/run.scm

    r26407 r35154  
    1 (use md5 message-digest test)
     1(use simple-md5 test files)
    22
    33(test-begin "MD5")
     
    55(test-group "MD5 Strings"
    66  (test-group "RFC1321 tests"
    7     (test "d41d8cd98f00b204e9800998ecf8427e" (message-digest-string (md5-primitive) ""))
    8     (test "0cc175b9c0f1b6a831c399e269772661" (message-digest-string (md5-primitive) "a"))
    9     (test "900150983cd24fb0d6963f7d28e17f72" (message-digest-string (md5-primitive) "abc"))
    10     (test "f96b697d7cb7938d525a2f31aaf161d0" (message-digest-string (md5-primitive) "message digest"))
    11     (test "c3fcd3d76192e4007dfb496cca67e13b" (message-digest-string (md5-primitive) "abcdefghijklmnopqrstuvwxyz"))
    12     (test "d174ab98d277d9f5a5611c2c9f419d9f" (message-digest-string (md5-primitive) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"))
    13     (test "57edf4a22be3c955ac49da2e2107b67a" (message-digest-string (md5-primitive) "12345678901234567890123456789012345678901234567890123456789012345678901234567890")))
     7    (test "d41d8cd98f00b204e9800998ecf8427e" (string->md5sum ""))
     8    (test "0cc175b9c0f1b6a831c399e269772661" (string->md5sum "a"))
     9    (test "900150983cd24fb0d6963f7d28e17f72" (string->md5sum "abc"))
     10    (test "f96b697d7cb7938d525a2f31aaf161d0" (string->md5sum "message digest"))
     11    (test "c3fcd3d76192e4007dfb496cca67e13b" (string->md5sum "abcdefghijklmnopqrstuvwxyz"))
     12    (test "d174ab98d277d9f5a5611c2c9f419d9f" (string->md5sum "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"))
     13    (test "57edf4a22be3c955ac49da2e2107b67a" (string->md5sum "12345678901234567890123456789012345678901234567890123456789012345678901234567890")))
    1414
    1515  ;; These tests from "a fast implementation of MD5" for CL:
     
    1717  (test-group "Padding tests"
    1818    ;; From padding bug report by Edi Weitz
    19     (test "d734945e5930bb28859ccd13c830358b" (message-digest-string (md5-primitive) "1631901HERR BUCHHEISTERCITROEN NORD1043360796beckenbauer"))
     19    (test "d734945e5930bb28859ccd13c830358b" (string->md5sum "1631901HERR BUCHHEISTERCITROEN NORD1043360796beckenbauer"))
    2020    ;; Test padding for strings from 0 to 69*8 bits in size.
    21     (test "d41d8cd98f00b204e9800998ecf8427e" (message-digest-string (md5-primitive) ""))
    22     (test "0cc175b9c0f1b6a831c399e269772661" (message-digest-string (md5-primitive) "a"))
    23     (test "4124bc0a9335c27f086f24ba207a4912" (message-digest-string (md5-primitive) "aa"))
    24     (test "47bce5c74f589f4867dbd57e9ca9f808" (message-digest-string (md5-primitive) "aaa"))
    25     (test "74b87337454200d4d33f80c4663dc5e5" (message-digest-string (md5-primitive) "aaaa"))
    26     (test "594f803b380a41396ed63dca39503542" (message-digest-string (md5-primitive) "aaaaa"))
    27     (test "0b4e7a0e5fe84ad35fb5f95b9ceeac79" (message-digest-string (md5-primitive) "aaaaaa"))
    28     (test "5d793fc5b00a2348c3fb9ab59e5ca98a" (message-digest-string (md5-primitive) "aaaaaaa"))
    29     (test "3dbe00a167653a1aaee01d93e77e730e" (message-digest-string (md5-primitive) "aaaaaaaa"))
    30     (test "552e6a97297c53e592208cf97fbb3b60" (message-digest-string (md5-primitive) "aaaaaaaaa"))
    31     (test "e09c80c42fda55f9d992e59ca6b3307d" (message-digest-string (md5-primitive) "aaaaaaaaaa"))
    32     (test "d57f21e6a273781dbf8b7657940f3b03" (message-digest-string (md5-primitive) "aaaaaaaaaaa"))
    33     (test "45e4812014d83dde5666ebdf5a8ed1ed" (message-digest-string (md5-primitive) "aaaaaaaaaaaa"))
    34     (test "c162de19c4c3731ca3428769d0cd593d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaa"))
    35     (test "451599a5f9afa91a0f2097040a796f3d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaa"))
    36     (test "12f9cf6998d52dbe773b06f848bb3608" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaa"))
    37     (test "23ca472302f49b3ea5592b146a312da0" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaa"))
    38     (test "88e42e96cc71151b6e1938a1699b0a27" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaa"))
    39     (test "2c60c24e7087e18e45055a33f9a5be91" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaa"))
    40     (test "639d76897485360b3147e66e0a8a3d6c" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaa"))
    41     (test "22d42eb002cefa81e9ad604ea57bc01d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaa"))
    42     (test "bd049f221af82804c5a2826809337c9b" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaa"))
    43     (test "ff49cfac3968dbce26ebe7d4823e58bd" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaa"))
    44     (test "d95dbfee231e34cccb8c04444412ed7d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaa"))
    45     (test "40edae4bad0e5bf6d6c2dc5615a86afb" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaa"))
    46     (test "a5a8bfa3962f49330227955e24a2e67c" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaa"))
    47     (test "ae791f19bdf77357ff10bb6b0e97e121" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaa"))
    48     (test "aaab9c59a88bf0bdfcb170546c5459d6" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    49     (test "b0f0545856af1a340acdedce23c54b97" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    50     (test "f7ce3d7d44f3342107d884bfa90c966a" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    51     (test "59e794d45697b360e18ba972bada0123" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    52     (test "3b0845db57c200be6052466f87b2198a" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    53     (test "5eca9bd3eb07c006cd43ae48dfde7fd3" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    54     (test "b4f13cb081e412f44e99742cb128a1a5" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    55     (test "4c660346451b8cf91ef50f4634458d41" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    56     (test "11db24dc3f6c2145701db08625dd6d76" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    57     (test "80dad3aad8584778352c68ab06250327" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    58     (test "1227fe415e79db47285cb2689c93963f" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    59     (test "8e084f489f1bdf08c39f98ff6447ce6d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    60     (test "08b2f2b0864bac1ba1585043362cbec9" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    61     (test "4697843037d962f62a5a429e611e0f5f" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    62     (test "10c4da18575c092b486f8ab96c01c02f" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    63     (test "af205d729450b663f48b11d839a1c8df" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    64     (test "0d3f91798fac6ee279ec2485b25f1124" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    65     (test "4c3c7c067634daec9716a80ea886d123" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    66     (test "d1e358e6e3b707282cdd06e919f7e08c" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    67     (test "8c6ded4f0af86e0a7e301f8a716c4363" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    68     (test "4c2d8bcb02d982d7cb77f649c0a2dea8" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    69     (test "bdb662f765cd310f2a547cab1cfecef6" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    70     (test "08ff5f7301d30200ab89169f6afdb7af" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    71     (test "6eb6a030bcce166534b95bc2ab45d9cf" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    72     (test "1bb77918e5695c944be02c16ae29b25e" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    73     (test "b6fe77c19f0f0f4946c761d62585bfea" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    74     (test "e9e7e260dce84ffa6e0e7eb5fd9d37fc" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    75     (test "eced9e0b81ef2bba605cbc5e2e76a1d0" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    76     (test "ef1772b6dff9a122358552954ad0df65" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    77     (test "3b0c8ac703f828b04c6c197006d17218" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    78     (test "652b906d60af96844ebd21b674f35e93" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    79     (test "dc2f2f2462a0d72358b2f99389458606" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    80     (test "762fc2665994b217c52c3c2eb7d9f406" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    81     (test "cc7ed669cf88f201c3297c6a91e1d18d" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    82     (test "cced11f7bbbffea2f718903216643648" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    83     (test "24612f0ce2c9d2cf2b022ef1e027a54f" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    84     (test "b06521f39153d618550606be297466d5" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    85     (test "014842d480b571495a4a0363793f7367" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    86     (test "c743a45e0d2e6a95cb859adae0248435" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    87     (test "def5d97e01e1219fb2fc8da6c4d6ba2f" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    88     (test "92cb737f8687ccb93022fdb411a77cca" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    89     (test "a0d1395c7fb36247bfe2d49376d9d133" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
    90     (test "ab75504250558b788f99d1ebd219abf2" (message-digest-string (md5-primitive) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))))
     21    (test "d41d8cd98f00b204e9800998ecf8427e" (string->md5sum ""))
     22    (test "0cc175b9c0f1b6a831c399e269772661" (string->md5sum "a"))
     23    (test "4124bc0a9335c27f086f24ba207a4912" (string->md5sum "aa"))
     24    (test "47bce5c74f589f4867dbd57e9ca9f808" (string->md5sum "aaa"))
     25    (test "74b87337454200d4d33f80c4663dc5e5" (string->md5sum "aaaa"))
     26    (test "594f803b380a41396ed63dca39503542" (string->md5sum "aaaaa"))
     27    (test "0b4e7a0e5fe84ad35fb5f95b9ceeac79" (string->md5sum "aaaaaa"))
     28    (test "5d793fc5b00a2348c3fb9ab59e5ca98a" (string->md5sum "aaaaaaa"))
     29    (test "3dbe00a167653a1aaee01d93e77e730e" (string->md5sum "aaaaaaaa"))
     30    (test "552e6a97297c53e592208cf97fbb3b60" (string->md5sum "aaaaaaaaa"))
     31    (test "e09c80c42fda55f9d992e59ca6b3307d" (string->md5sum "aaaaaaaaaa"))
     32    (test "d57f21e6a273781dbf8b7657940f3b03" (string->md5sum "aaaaaaaaaaa"))
     33    (test "45e4812014d83dde5666ebdf5a8ed1ed" (string->md5sum "aaaaaaaaaaaa"))
     34    (test "c162de19c4c3731ca3428769d0cd593d" (string->md5sum "aaaaaaaaaaaaa"))
     35    (test "451599a5f9afa91a0f2097040a796f3d" (string->md5sum "aaaaaaaaaaaaaa"))
     36    (test "12f9cf6998d52dbe773b06f848bb3608" (string->md5sum "aaaaaaaaaaaaaaa"))
     37    (test "23ca472302f49b3ea5592b146a312da0" (string->md5sum "aaaaaaaaaaaaaaaa"))
     38    (test "88e42e96cc71151b6e1938a1699b0a27" (string->md5sum "aaaaaaaaaaaaaaaaa"))
     39    (test "2c60c24e7087e18e45055a33f9a5be91" (string->md5sum "aaaaaaaaaaaaaaaaaa"))
     40    (test "639d76897485360b3147e66e0a8a3d6c" (string->md5sum "aaaaaaaaaaaaaaaaaaa"))
     41    (test "22d42eb002cefa81e9ad604ea57bc01d" (string->md5sum "aaaaaaaaaaaaaaaaaaaa"))
     42    (test "bd049f221af82804c5a2826809337c9b" (string->md5sum "aaaaaaaaaaaaaaaaaaaaa"))
     43    (test "ff49cfac3968dbce26ebe7d4823e58bd" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaa"))
     44    (test "d95dbfee231e34cccb8c04444412ed7d" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaa"))
     45    (test "40edae4bad0e5bf6d6c2dc5615a86afb" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaa"))
     46    (test "a5a8bfa3962f49330227955e24a2e67c" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaa"))
     47    (test "ae791f19bdf77357ff10bb6b0e97e121" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaa"))
     48    (test "aaab9c59a88bf0bdfcb170546c5459d6" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     49    (test "b0f0545856af1a340acdedce23c54b97" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     50    (test "f7ce3d7d44f3342107d884bfa90c966a" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     51    (test "59e794d45697b360e18ba972bada0123" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     52    (test "3b0845db57c200be6052466f87b2198a" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     53    (test "5eca9bd3eb07c006cd43ae48dfde7fd3" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     54    (test "b4f13cb081e412f44e99742cb128a1a5" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     55    (test "4c660346451b8cf91ef50f4634458d41" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     56    (test "11db24dc3f6c2145701db08625dd6d76" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     57    (test "80dad3aad8584778352c68ab06250327" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     58    (test "1227fe415e79db47285cb2689c93963f" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     59    (test "8e084f489f1bdf08c39f98ff6447ce6d" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     60    (test "08b2f2b0864bac1ba1585043362cbec9" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     61    (test "4697843037d962f62a5a429e611e0f5f" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     62    (test "10c4da18575c092b486f8ab96c01c02f" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     63    (test "af205d729450b663f48b11d839a1c8df" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     64    (test "0d3f91798fac6ee279ec2485b25f1124" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     65    (test "4c3c7c067634daec9716a80ea886d123" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     66    (test "d1e358e6e3b707282cdd06e919f7e08c" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     67    (test "8c6ded4f0af86e0a7e301f8a716c4363" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     68    (test "4c2d8bcb02d982d7cb77f649c0a2dea8" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     69    (test "bdb662f765cd310f2a547cab1cfecef6" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     70    (test "08ff5f7301d30200ab89169f6afdb7af" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     71    (test "6eb6a030bcce166534b95bc2ab45d9cf" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     72    (test "1bb77918e5695c944be02c16ae29b25e" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     73    (test "b6fe77c19f0f0f4946c761d62585bfea" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     74    (test "e9e7e260dce84ffa6e0e7eb5fd9d37fc" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     75    (test "eced9e0b81ef2bba605cbc5e2e76a1d0" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     76    (test "ef1772b6dff9a122358552954ad0df65" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     77    (test "3b0c8ac703f828b04c6c197006d17218" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     78    (test "652b906d60af96844ebd21b674f35e93" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     79    (test "dc2f2f2462a0d72358b2f99389458606" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     80    (test "762fc2665994b217c52c3c2eb7d9f406" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     81    (test "cc7ed669cf88f201c3297c6a91e1d18d" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     82    (test "cced11f7bbbffea2f718903216643648" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     83    (test "24612f0ce2c9d2cf2b022ef1e027a54f" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     84    (test "b06521f39153d618550606be297466d5" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     85    (test "014842d480b571495a4a0363793f7367" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     86    (test "c743a45e0d2e6a95cb859adae0248435" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     87    (test "def5d97e01e1219fb2fc8da6c4d6ba2f" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     88    (test "92cb737f8687ccb93022fdb411a77cca" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     89    (test "a0d1395c7fb36247bfe2d49376d9d133" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
     90    (test "ab75504250558b788f99d1ebd219abf2" (string->md5sum "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))))
     91
     92(test-group "MD5sum of files"
     93  (let ((file (create-temporary-file)))
     94    (with-output-to-file file
     95      (lambda () (display "message digest")))
     96
     97    (test "f96b697d7cb7938d525a2f31aaf161d0" (file-md5sum file))
     98    (delete-file* file)))
    9199
    92100(test-end)
Note: See TracChangeset for help on using the changeset viewer.