Commit a2836d0b authored by mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Fix output of SYS:SHA256.

Muffle warning of SYS:SHA256 when used for single file.
parent d010b431
......@@ -33,16 +33,17 @@
(in-package :system)
(defun asciify (digest)
(format nil "~{~X~}"
(format nil "~{~2,'0X~}"
(mapcar (lambda (b) (if (< b 0) (+ 256 b) b))
(java::list-from-jarray digest))))
;;;; Really needs to concatenate all input into a single source of
;;;; bytes, running digest over that concatentation
;;;; bytes, running digest over that concatentation.
(defun sha256 (&rest paths-or-strings) ;;; XXX more than one arg is very broken.
"Returned ASCIIfied representation of SHA256 digest of byte-based resource at PATHS-OR-STRINGs."
(warn "Unaudited computatation of cryptographic digest initiated.") ;; TODO Need tests with some tool for verification
(unless (and (null (rest paths-or-strings))
(pathnamep (first paths-or-strings)))
(warn "Unaudited computation of cryptographic digest initiated.")) ;; TODO Need tests with some tool for verification
(let ((first (first paths-or-strings))
(rest (rest paths-or-strings)))
(concatenate 'string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment