From: Matt Birkholz Date: Wed, 17 May 2017 23:12:22 +0000 (-0700) Subject: runtime/crypto: Allow strings for module names; fix a string-append. X-Git-Tag: mit-scheme-pucked-9.2.12~14^2~47 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3bee1a70ecfabc9622cd9f985d3ab6a9a2fd81d5;p=mit-scheme.git runtime/crypto: Allow strings for module names; fix a string-append. --- diff --git a/src/runtime/crypto.scm b/src/runtime/crypto.scm index 81fc39c47..4bd204aba 100644 --- a/src/runtime/crypto.scm +++ b/src/runtime/crypto.scm @@ -353,8 +353,7 @@ USA. (guarantee-mcrypt-context context name) (let ((code (primitive (mcrypt-context-index context) bytes start end))) (if (not (eqv? code 0)) - (error (string-append "Error code signalled by " primitive ":") - code))))) + (error (string "Error code signalled by "name":") code))))) (define mcrypt-encrypt! (make-mcrypt-transform! 'mcrypt-encrypt! @@ -379,6 +378,7 @@ USA. (lambda (object) (cond ((mcrypt-context? object) (context-op (mcrypt-context-index object))) ((bytevector? object) (module-op object)) + ((string? object) (module-op (string->utf8 object))) (else (error:wrong-type-argument object "mcrypt context" name))))) (define mcrypt-self-test