|#
-;;;; Test the BLOWFISH option.
+;;;; Test the Blowfish option.
(let ((sample (string->utf8 "Some text to encrypt and decrypt.")))
(call-with-binary-output-file "test"
#!/bin/sh
#
-# Test the BLOWFISH option.
+# Test the Blowfish option.
set -e
${MIT_SCHEME_EXE} --prepend-library . <<\EOF
-(load-option 'BLOWFISH)
+(load-option 'blowfish)
(load "blowfish-check" (->environment '(blowfish)))
EOF
(define p24 #u8(#xFE #xDC #xBA #x98 #x76 #x54 #x32 #x10))
(let ((k (bytevector-copy k24 0 i))
(p p24))
- (define-bf-test (symbol 'VARIABLE-KEY ': i ': 'ENCRYPT)
+ (define-bf-test (symbol 'variable-key ': i ': 'encrypt)
(lambda ()
(let ((bf (blowfish-set-key k))
(buf (make-bytevector 8)))
(blowfish-ecb p buf bf #t)
(assert-equal buf c))))
- (define-bf-test (symbol 'VARIABLE-KEY ': i ': 'DECRYPT)
+ (define-bf-test (symbol 'variable-key ': i ': 'decrypt)
(lambda ()
(let ((bf (blowfish-set-key k))
(buf (make-bytevector 8)))
((lambda (ks ps cs)
((lambda (doit) (for-each doit (iota (length ks)) ks ps cs))
(lambda (i k p c)
- (define-bf-test (symbol 'ENCRYPT ': i)
+ (define-bf-test (symbol 'encrypt ': i)
(lambda ()
(let ((bf (blowfish-set-key k))
(buf (make-bytevector 8)))
(blowfish-ecb p buf bf #t)
(assert-equal buf c))))
- (define-bf-test (symbol 'DECRYPT ': i)
+ (define-bf-test (symbol 'decrypt ': i)
(lambda ()
(let ((bf (blowfish-set-key k))
(buf (make-bytevector 8)))
(define iv #u8(7 6 5 4 3 2 1 0))
(define p #u8(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23))
(let ((p (bytevector-copy p 0 i)))
- (define-bf-test (symbol 'CBC:ENCRYPT ': i)
+ (define-bf-test (symbol 'cbc:encrypt ': i)
(lambda ()
(let ((bf (blowfish-set-key k))
(iv (bytevector-copy iv))
(blowfish-cbc p buf bf iv #t)
(assert-equal buf c)
(assert-equal iv (bytevector-copy buf (- i 8) i)))))
- (define-bf-test (symbol 'CBC:DECRYPT ': i)
+ (define-bf-test (symbol 'cbc:decrypt ': i)
(lambda ()
(let ((bf (blowfish-set-key k))
(iv (bytevector-copy iv))
(error:bad-range-argument end operator)))
(define (blowfish-encrypt-port input output key init-vector encrypt?)
- ;; Assumes that INPUT is in blocking mode.
+ ;; Assumes that input is in blocking mode.
(let ((key (blowfish-set-key key))
(input-buffer (make-bytevector 4096))
(output-buffer (make-bytevector 4096)))
#| -*-Scheme-*- |#
-;;;; Compile the BLOWFISH option.
+;;;; Compile the Blowfish option.
(load-option 'cref)
(with-working-directory-pathname (directory-pathname (current-load-pathname))
# 2015, 2016, 2017, 2018, 2019 Massachusetts Institute of
# Technology
#
-# This file is part of a Blowfish plugin for MIT/GNU Scheme.
+# This file is part of MIT/GNU Scheme.
#
-# This plugin is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# MIT/GNU Scheme is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
#
-# This plugin is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MIT/GNU Scheme is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this plugin; if not, write to the Free Software
+# along with MIT/GNU Scheme; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301, USA.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([MIT/GNU Scheme blowfish plugin],
+AC_INIT([MIT/GNU Scheme Blowfish plugin],
[1.1],
[bug-mit-scheme@gnu.org],
[mit-scheme-blowfish])
#| -*-Scheme-*- |#
-;;;; Load the BLOWFISH option.
+;;;; Load the Blowfish option.
(with-working-directory-pathname (directory-pathname (current-load-pathname))
(lambda ()
#| -*-Scheme-*- |#
-(define-load-option 'BLOWFISH
+(define-load-option 'blowfish
(standard-system-loader "."))
(further-load-options #t)
\ No newline at end of file