From 43a626f0757954bcc36ad9a140d0cc188876c11a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 14 Aug 1999 03:41:01 +0000 Subject: [PATCH] Improve method used to compute initialization vectors. --- v7/src/runtime/blowfish.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/v7/src/runtime/blowfish.scm b/v7/src/runtime/blowfish.scm index cba6f4705..cdeeb301d 100644 --- a/v7/src/runtime/blowfish.scm +++ b/v7/src/runtime/blowfish.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: blowfish.scm,v 1.16 1999/08/14 03:40:26 cph Exp $ +$Id: blowfish.scm,v 1.17 1999/08/14 03:41:01 cph Exp $ Copyright (c) 1997, 1999 Massachusetts Institute of Technology @@ -124,13 +124,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (string-fill! input-buffer #\NUL) (string-fill! output-buffer #\NUL))))) -(define (write-blowfish-file-header port) - (write-string blowfish-file-header-v2 port) - (newline port) - (let ((init-vector (compute-blowfish-init-vector))) - (write-string init-vector port) - init-vector)) - (define (compute-blowfish-init-vector) ;; This init vector includes a timestamp with a resolution of ;; milliseconds, plus 20 random bits. This should make it very @@ -146,6 +139,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (vector-8b-set! iv i (remainder t #x100))) iv)) +(define (write-blowfish-file-header port) + (write-string blowfish-file-header-v2 port) + (newline port) + (let ((init-vector (compute-blowfish-init-vector))) + (write-string init-vector port) + init-vector)) + (define (read-blowfish-file-header port) (let ((line (read-line port))) (cond ((string=? blowfish-file-header-v1 line) -- 2.25.1