Changeset 14582


Ignore:
Timestamp:
11/01/13 13:14:52 (3 years ago)
Author:
mevenson
Message:

Fix output of SYS:SHA256.

Muffle warning of SYS:SHA256 when used for single file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/digest.lisp

    r14367 r14582  
    3434
    3535(defun asciify (digest)
    36   (format nil "~{~X~}"
     36  (format nil "~{~2,'0X~}"
    3737          (mapcar (lambda (b) (if (< b 0) (+ 256 b) b))
    3838                  (java::list-from-jarray digest))))
    3939
    40 
    4140;;;; Really needs to concatenate all input into a single source of
    42 ;;;; bytes, running digest over that concatentation
     41;;;; bytes, running digest over that concatentation.
    4342(defun sha256 (&rest paths-or-strings) ;;; XXX more than one arg is very broken.
    4443  "Returned ASCIIfied representation of SHA256 digest of byte-based resource at PATHS-OR-STRINGs."
    45   (warn "Unaudited computatation of cryptographic digest initiated.") ;; TODO Need tests with some tool for verification
     44  (unless (and (null (rest paths-or-strings))
     45         (pathnamep (first paths-or-strings)))
     46    (warn "Unaudited computation of cryptographic digest initiated.")) ;; TODO Need tests with some tool for verification
    4647  (let ((first (first paths-or-strings))
    4748        (rest (rest paths-or-strings)))
Note: See TracChangeset for help on using the changeset viewer.