Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
abcl
abcl
Commits
a2836d0b
Commit
a2836d0b
authored
Nov 01, 2013
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/armedbear/lisp/digest.lisp
View file @
a2836d0b
...
...
@@ -33,16 +33,17 @@
(
in-package
:system
)
(
defun
asciify
(
digest
)
(
format
nil
"~{~X~}"
(
format
nil
"~{~
2,'0
X~}"
(
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment