;;; hashcash.el --- Add hashcash payments to email
;; Copyright (C) 1997--2002 Paul E. Foley
-;; Copyright (C) 2003 Free Software Foundation
+;; Copyright (C) 2003, 2004 Free Software Foundation
;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
;; Keywords: mail, hashcash
(defun hashcash-generate-payment (str val)
"Generate a hashcash payment by finding a VAL-bit collison on STR."
- (if (and (> val 0)
+ (if (and (> val 0)
hashcash-path)
(save-excursion
(set-buffer (get-buffer-create " *hashcash*"))
"-m" "-q" "-b" (number-to-string val) str)
(goto-char (point-min))
(hashcash-token-substring))
- (progn
- (message "No hashcash binary found")
- (sleep-for 1)
- nil)))
+ (error "No `hashcash' binary found")))
(defun hashcash-check-payment (token str val)
"Check the validity of a hashcash payment."
"-b" (number-to-string val)
"-r" str
token))
- (progn
- (message "No hashcash binary found")
- (sleep-for 1)
- nil)))
+ (error "No `hashcash' binary found")))
(defun hashcash-version (token)
"Find the format version of a hashcash token."