diff --git a/aws-sign4.lisp b/aws-sign4.lisp index 1afd53e..2d1f8aa 100644 --- a/aws-sign4.lisp +++ b/aws-sign4.lisp @@ -23,7 +23,11 @@ data)) (defun hash (data) - (ironclad:digest-sequence :sha256 data)) + (etypecase data + ((simple-array (unsigned-byte 8) (*)) + (ironclad:digest-sequence :sha256 data)) + (pathname + (ironclad:digest-file :sha256 data)))) (defun hex-encode (bytes) (ironclad:byte-array-to-hex-string bytes))