Change keygen-type generation so that salt is supplied in the call to
authorChris Hanson <org/chris-hanson/cph>
Tue, 11 Apr 2000 16:01:42 +0000 (16:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 11 Apr 2000 16:01:42 +0000 (16:01 +0000)
MHASH-KEYGEN, if needed.  This is desirable because the salt is
usually unique for each passphrase.

v7/src/runtime/crypto.scm

index d31d70f73cf00f980ac12823301ac272907daad0..3b37a9dc472d49cf280dc1fbd1f937678d50dcb6 100644 (file)
@@ -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:"