header manipulation handles the init-vector.
;;; -*-Scheme-*-
;;;
-;;; $Id: dosfile.scm,v 1.27 1999/05/21 04:31:57 cph Exp $
+;;; $Id: dosfile.scm,v 1.28 1999/08/09 03:25:51 cph Exp $
;;;
;;; Copyright (c) 1994-1999 Massachusetts Institute of Technology
;;;
(cond ((equal? "bf" type)
(call-with-binary-input-file pathname
(lambda (input)
- (read-blowfish-file-header input)
(call-with-output-mark mark
(lambda (output)
- (blowfish-encrypt-port input output password #f))))))
+ (blowfish-encrypt-port input output password
+ (read-blowfish-file-header input)
+ #f))))))
((or (equal? "ky" type) (equal? "KY" type))
(insert-string (let ((the-encrypted-file
(call-with-binary-input-file pathname
(region-end region))))
(call-with-binary-output-file pathname
(lambda (output)
- (write-blowfish-file-header output)
- (blowfish-encrypt-port input output password #t)))))
+ (blowfish-encrypt-port input output password
+ (write-blowfish-file-header output)
+ #t)))))
((or (equal? "ky" type) (equal? "KY" type))
(let ((the-encrypted-file
(encrypt (extract-string (region-start region)
;;; -*-Scheme-*-
;;;
-;;; $Id: filcom.scm,v 1.201 1999/01/29 04:50:01 cph Exp $
+;;; $Id: filcom.scm,v 1.202 1999/08/09 03:25:20 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology
;;;
(lambda (input)
(call-with-binary-output-file to
(lambda (output)
- (write-blowfish-file-header output)
- (blowfish-encrypt-port input output password #t))))))
+ (blowfish-encrypt-port input output password
+ (write-blowfish-file-header output)
+ #t))))))
(delete-file from)))))
(define-command decrypt-file
(let ((password (prompt-for-password "Password")))
(call-with-binary-input-file from
(lambda (input)
- (read-blowfish-file-header input)
((if binary?
call-with-binary-output-file
call-with-output-file)
to
(lambda (output)
- (blowfish-encrypt-port input output password #f)))))))))
+ (blowfish-encrypt-port input output password
+ (read-blowfish-file-header input)
+ #f)))))))))
\f
;;;; Prompting
;;; -*-Scheme-*-
;;;
-;;; $Id: unix.scm,v 1.95 1999/06/06 18:26:46 cph Exp $
+;;; $Id: unix.scm,v 1.96 1999/08/09 03:26:14 cph Exp $
;;;
;;; Copyright (c) 1989-1999 Massachusetts Institute of Technology
;;;
(cond ((equal? "bf" type)
(call-with-binary-input-file pathname
(lambda (input)
- (read-blowfish-file-header input)
(call-with-output-mark mark
(lambda (output)
- (blowfish-encrypt-port input output password #f))))))
+ (blowfish-encrypt-port input output password
+ (read-blowfish-file-header input)
+ #f))))))
((or (equal? "ky" type) (equal? "KY" type))
(insert-string (let ((the-encrypted-file
(call-with-binary-input-file pathname
(region-end region))))
(call-with-binary-output-file pathname
(lambda (output)
- (write-blowfish-file-header output)
- (blowfish-encrypt-port input output password #t)))))
+ (blowfish-encrypt-port input output password
+ (write-blowfish-file-header output)
+ #t)))))
((or (equal? "ky" type) (equal? "KY" type))
(let ((the-encrypted-file
(encrypt (extract-string (region-start region)