Update of /project/crypticl/cvsroot/crypticl/src In directory common-lisp.net:/tmp/cvs-serv21733/src
Modified Files: crypticl-package.lisp keystore.lisp test.lisp Added Files: load.lisp Log Message: Changing loading.
Date: Sun Nov 14 20:56:30 2004 Author: tskogan
Index: crypticl/src/load.lisp diff -u /dev/null crypticl/src/load.lisp:1.4 --- /dev/null Sun Nov 14 20:56:30 2004 +++ crypticl/src/load.lisp Sun Nov 14 20:56:29 2004 @@ -0,0 +1,42 @@ +;;;;-*-lisp-*- +;;;; The Crypticl cryptographic library. +;;;; +;;;; Description: Loads the library. +;;;; +;;;; Usage: Loading this file will load the rest of the library. +;;;; After loading you can list the public interface with +;;;; (crypticl:print-external-symbols) from the top-level. +;;;; Author: Tåle Skogan tasko@frisurf.no +;;;; Distribution: See the accompanying file LICENSE. + +(in-package cl-user) + +;;(proclaim '(optimize (speed 2) (safety 1) (space 1) (debug 3))) + + +;; Load library. If fast-load is true, do quick load without recompiling. +;; NB! The order of the file names in the list matter. +(let ((fast-load t) + (files '("crypticl-package" + "utilities" + "numtheory" + "common" + "sha" ;used by random + "random" + "keygenerator" + "md5" "aes" "idea" "dsa" "rsa" "diffie-hellman" + "keystore" + "test"))) + (format t "Loading the Crypticl library...") + (dolist (file files) + (let* ((path + (make-pathname + :device (pathname-device *load-pathname*) + :directory (directory-namestring *load-pathname*))) + (module (merge-pathnames file path))) + (if fast-load + (excl::compile-file-if-needed module) + (compile-file module :verbose nil)) + (load module)))) + +
Index: crypticl/src/crypticl-package.lisp diff -u crypticl/src/crypticl-package.lisp:1.5 crypticl/src/crypticl-package.lisp:1.6 --- crypticl/src/crypticl-package.lisp:1.5 Sun Nov 14 00:10:39 2004 +++ crypticl/src/crypticl-package.lisp Sun Nov 14 20:56:29 2004 @@ -55,34 +55,3 @@ decrypt print-external-symbols))
-;;(proclaim '(optimize (speed 2) (safety 1) (space 1) (debug 3))) -(in-package crypticl) - -(defun load-package (&optional (path "") (fast-load nil)) - "Load library. Default src location is current directory. If fast-load is true, do quick load without recompiling and running unit tests." - - (format t "Loading the Crypticl library...") - ;; NB! The order of the file names in the list matter. - (let ((files '("utilities" - "numtheory" - "common" - "sha" ;used by random - "random" - "keygenerator" - "md5" "aes" "idea" "dsa" "rsa" "diffie-hellman" - "keystore" - "test"))) - (dolist (file files) - (let ((module (concatenate 'string path file))) - (if fast-load - (excl::compile-file-if-needed module) - (compile-file module :verbose nil)) - (load module))) - - (unless fast-load - (run-tests)))) - - -;;(load-package) - -
Index: crypticl/src/keystore.lisp diff -u crypticl/src/keystore.lisp:1.1 crypticl/src/keystore.lisp:1.2 --- crypticl/src/keystore.lisp:1.1 Sun Nov 7 13:04:17 2004 +++ crypticl/src/keystore.lisp Sun Nov 14 20:56:29 2004 @@ -43,7 +43,7 @@ (parse-integer (nth 3 tokens)) (parse-integer (nth 4 tokens))))
-|# +#| "Tåle Skogan" "tasko@stud.cs.uit.no" - first line RSAPublicKey "22ffee" 5 119 - one line per key RSAPrivateKey "22ffee" 77 119 @@ -52,7 +52,7 @@ RSAPublicKey "1234ffee" 3533 11413 RSAPrivateKey "4321ffee" 6597 11413 **** -#| +|#
(defun new-user (line) (string= (string-trim " " line ) "****")) @@ -142,7 +142,7 @@ "Retrieves key" (gethash fingerprint (ht obj)))
-|# +#| "Tåle Skogan" "tasko@stud.cs.uit.no" - first line RSAPublicKey "22ffee" 5 119 - one line per key RSAPrivateKey "22ffee" 77 119 @@ -151,7 +151,7 @@ RSAPublicKey "1234ffee" 3533 11413 RSAPrivateKey "4321ffee" 6597 11413 **** -#| +|#
(defmethod write-to-file ((obj KeyStore) &optional (filename (path obj))) (with-open-file (str filename :direction :output :if-exists :supersede)
Index: crypticl/src/test.lisp diff -u crypticl/src/test.lisp:1.2 crypticl/src/test.lisp:1.3 --- crypticl/src/test.lisp:1.2 Sun Nov 7 01:17:35 2004 +++ crypticl/src/test.lisp Sun Nov 14 20:56:29 2004 @@ -53,4 +53,6 @@ (test-AES) (test-RSA) (test-IDEA) - (test-DSA)) \ No newline at end of file + (test-DSA)) + +(run-tests) \ No newline at end of file