Last active
December 13, 2015 22:39
-
-
Save tkych/4985964 to your computer and use it in GitHub Desktop.
check digest script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; Last modified : 2013-02-19 22:33:54 tkych | |
;;==================================================================== | |
;; Check Digest | |
;;==================================================================== | |
(ql:quickload :ironclad) | |
(defun check-digest (file-spec digest-name check-sum) | |
(loop | |
:for i :across (ironclad:digest-file | |
(ironclad:make-digest digest-name) | |
file-spec) | |
:collect (format nil "~2,'0X" i) :into acc | |
:finally (return (string= | |
(apply #'concatenate 'string acc) | |
(string-upcase check-sum))))) | |
;; (check-digest | |
;; "~/tmp/rhythmbox-2.98.tar.xz" | |
;; :SHA256 | |
;; "a5c0a18a7c76133d36c7dcbdc37e304eae8272703985b17b540d68603b0c76d5") | |
;;==================================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment