David Krentzlin  committed e2e3cc8

updated to use new md5 and message-digest api. Bumped version

  • Participants
  • Parent commits 76cd828
  • Branches default

Comments (0)

Files changed (4)

  (category net)
  (license "MIT")
- (depends defstruct md5 utf8)
+ (depends defstruct md5 message-digest utf8)
  (test-depends test)
  (files ".hgignore" "dict.meta" "dict.release-info" "dict.scm" "dict.setup" "tests/example.scm" "tests/run.scm"))
     make-connection connect disconnect connection-msg-id connection-server-capabilities 
     *current-log-port* !match !define !databases !strategies !server-information !database-information
     !help !status !quit !announce-client !authenticate)
   (import scheme chicken)
-  (require-library tcp defstruct srfi-13 srfi-14 md5)
+  (require-library tcp defstruct srfi-13 srfi-14 md5 message-digest)
       (if (string? obj) (string->sre obj) obj))))
   (import tcp defstruct
-          (only md5 md5-digest) 
+          (only md5 md5-primitive) 
+          (only message-digest message-digest-string) 
           (only srfi-14 char-set:digit)
           (only srfi-13 string-join string-index string-trim-right string-trim-both string-trim string-skip string-take string-drop)
 ;          (only regex string-split-fields)
        (status:authentication-successful? status)))
    (define (compute-password con password)
-     (md5-digest (string-append (connection-msg-id con) password)))
+     (message-digest-string (md5-primitive) (string-append (connection-msg-id con) password)))
   (define (connect server #!key (port (*default-port*)) (client "dict.egg for chicken scheme") (timeout #f))
   '("" "")
-  '((version 2.7)
+  '((version 2.8.0)
     (documentation "dict.html")))

File tests/run.scm

-(use test utf8 dict md5)
+(use test utf8 dict md5 message-digest)
 ;;some helpers
 (define (with-stubbed-io input proc)
                             (receive (s r) (!status con)
                               (list s r)))))
    ;;enable this once md5 has been ported to chicken 4
-    (define test-password (md5-digest (string-append "<>" "test")))
+    (define test-password (message-digest-string (md5-primitive) (string-append "<>" "test")))
     (test "authenticate success"
           `((output . ,(conc "AUTH test " test-password "\r\n"))