Arrgh. Fix another instance of the init-vector thinko.
authorChris Hanson <org/chris-hanson/cph>
Mon, 9 Aug 1999 04:07:11 +0000 (04:07 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 9 Aug 1999 04:07:11 +0000 (04:07 +0000)
v7/src/runtime/blowfish.scm

index c211df3a227bc5adf869297eecf6651785b64d6c..5c7f62d9b02576f2ae7753a67269d2e89b683af2 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: blowfish.scm,v 1.8 1999/08/09 03:24:27 cph Exp $
+$Id: blowfish.scm,v 1.9 1999/08/09 04:07:11 cph Exp $
 
 Copyright (c) 1997, 1999 Massachusetts Institute of Technology
 
@@ -93,16 +93,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                                                        key init-vector num
                                                        encrypt?))))
 \f
-(define (blowfish-encrypt-string plaintext key-string encrypt?)
+(define (blowfish-encrypt-string plaintext key-string init-vector encrypt?)
   (blowfish-encrypt-substring plaintext 0 (string-length plaintext)
                              key-string encrypt?))
 
-(define (blowfish-encrypt-substring plaintext start end key-string encrypt?)
+(define (blowfish-encrypt-substring plaintext start end
+                                   key-string init-vector encrypt?)
   (blowfish-cfb64-substring plaintext start end
                            (blowfish-set-key (md5 key-string))
-                           (make-string 8 #\NUL)
-                           0
-                           encrypt?))
+                           init-vector 0 encrypt?))
 
 (define (blowfish-encrypt-port input output key-string init-vector encrypt?)
   ;; Assumes that INPUT is in blocking mode.