From: Chris Hanson Date: Tue, 11 Apr 2000 16:01:42 +0000 (+0000) Subject: Change keygen-type generation so that salt is supplied in the call to X-Git-Tag: 20090517-FFI~4052 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f919d19be0a2186f54b13ad56bec50b9c9243139;p=mit-scheme.git Change keygen-type generation so that salt is supplied in the call to MHASH-KEYGEN, if needed. This is desirable because the salt is usually unique for each passphrase. --- diff --git a/v7/src/runtime/crypto.scm b/v7/src/runtime/crypto.scm index d31d70f73..3b37a9dc4 100644 --- a/v7/src/runtime/crypto.scm +++ b/v7/src/runtime/crypto.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: crypto.scm,v 14.8 2000/04/11 16:00:12 cph Exp $ +$Id: crypto.scm,v 14.9 2000/04/11 16:01:42 cph Exp $ Copyright (c) 2000 Massachusetts Institute of Technology @@ -140,7 +140,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (if (or (default-object? salt) (not salt)) (error "Salt required:" (vector-ref mhash-keygen-names id))) - (let ((n (mhash-keygen-salt-size name))) + (let ((n + ((ucode-primitive mhash_get_keygen_salt_size 1) + id))) (if (not (or (= n 0) (= n (string-length salt)))) (error "Salt size incorrect:"