Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

move MASSAGE-SYMBOL to a common place

Turns out ciphers--via (SETF %FIND-CIPHER)--and digests need it.  The
new directory structure hid that, and it must have worked by accident
earlier due to ASDF's dependency traversal.  Tidy up some dependencies
while we're at it.
  • Loading branch information...
commit d57e9fe48a469dc3901d0849e03840940e9f5002 1 parent 764f4d5
Nathan Froyd authored November 15, 2009
6  ironclad.asd
@@ -50,7 +50,7 @@
50 50
                          (:file "padding" :depends-on ("common"))
51 51
                          (:file "pkcs5" :depends-on ("common"))
52 52
                          (:module "ciphers"
53  
-                                  :depends-on ("package" "common" "macro-utils")
  53
+                                  :depends-on ("common" "macro-utils")
54 54
                                   :components
55 55
                                   (
56 56
                                    ;; block ciphers of various kinds
@@ -74,7 +74,7 @@
74 74
                                    ;; stream ciphers
75 75
                                    (:file "arcfour" :depends-on ("cipher"))))
76 76
                          (:module "digests"
77  
-                                  :depends-on ("package" "common")
  77
+                                  :depends-on ("common" "macro-utils")
78 78
                                   :components
79 79
                                   ((:file "digest")
80 80
                                    (:file "crc24" :depends-on ("digest"))
@@ -91,7 +91,7 @@
91 91
                                    (:file "tiger" :depends-on ("digest"))
92 92
                                    (:file "whirlpool" :depends-on ("digest"))))
93 93
                          (:module "macs"
94  
-                                  :depends-on ("package" "common" "digests")
  94
+                                  :depends-on ("common" "digests")
95 95
                                   :components
96 96
                                   ((:file "hmac")
97 97
                                    (:file "cmac")))
9  src/digests/digest.lisp
@@ -342,15 +342,6 @@ An error will be signaled if there is insufficient room in DIGEST."))
342 342
 (defgeneric digest-length (digest)
343 343
   (:documentation "Return the number of bytes in a digest generated by DIGEST."))
344 344
 
345  
-(defun massage-symbol (symbol)
346  
-  (let ((package (symbol-package symbol))
347  
-        (ironclad (load-time-value (find-package :ironclad))))
348  
-    (cond
349  
-      ((eq package ironclad) symbol)
350  
-      ((eq package (load-time-value (find-package :keyword)))
351  
-       (find-symbol (symbol-name symbol) ironclad))
352  
-      (t nil))))
353  
-
354 345
 (defmethod digest-length ((digest-name symbol))
355 346
   (or (digestp (massage-symbol digest-name))
356 347
       (error 'unsupported-digest :name digest-name)))
9  src/macro-utils.lisp
@@ -8,3 +8,12 @@
8 8
 
9 9
 (defun unquote (thing)
10 10
   (if (quotationp thing) (second thing) thing))
  11
+
  12
+(defun massage-symbol (symbol)
  13
+  (let ((package (symbol-package symbol))
  14
+        (ironclad (load-time-value (find-package :ironclad))))
  15
+    (cond
  16
+      ((eq package ironclad) symbol)
  17
+      ((eq package (load-time-value (find-package :keyword)))
  18
+       (find-symbol (symbol-name symbol) ironclad))
  19
+      (t nil))))

0 notes on commit d57e9fe

Please sign in to comment.
Something went wrong with that request. Please try again.