+2004-09-28 Simon Josefsson <jas@extundo.com>
+
+ * hashcash.el (hashcash-generate-payment)
+ (hashcash-check-payment): Use error.
+
2004-09-28 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-split-fancy-with-parent): use
;;; 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."