diff options
Diffstat (limited to 'mulkcms.lisp')
-rw-r--r-- | mulkcms.lisp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp index 40bfc92..8f1e2ce 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -30,7 +30,8 @@ (defun hashcash-hash-validp (text) - (let ((digest (ironclad:digest-sequence 'ironclad:sha256 (flexi-streams:string-to-octets text)))) + (let* ((stripped-text (ppcre:regex-replace-all "\\s+" text "")) + (digest (ironclad:digest-sequence 'ironclad:sha256 (flexi-streams:string-to-octets stripped-text :external-format :utf8)))) (every #'zerop (subseq digest 0 2)))) |