%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/mail/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/mail/hashcash.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305%\210\306\307\310\311\312DD\313\314\315\304\301&\210\306\316\310\311\317DD\320\314\321\304\301&\210\306\322\310\311\323DD\324\314\315\304\301&\210\306\325\310\311\326DD\327\314\330\304\301&\210\331\332\333\302#\210\334\211\203l\211@\332N\203e\333N\204e\335\333\332N#\210A\266\202\202K\210\336\332\333\337#\210\306\333\310\311\340DD\341\314\342\304\301&\210\306\343\310\311\344DD\345\314\346\304\301&\210\306\347\310\311\350DD\351\314\352\304\301&\210\306\353\310\311\354DD\355\314\356\304\301&\207" [custom-declare-group hashcash nil "Hashcash configuration." :group mail custom-declare-variable hashcash-default-payment funcall function #[0 "\300\207" [20] 1] "The default number of bits to pay to unknown users.\nIf this is zero, no payment header will be generated.\nSee `hashcash-payment-alist'." :type integer hashcash-payment-alist #[0 "\300\207" [nil] 1] "An association list mapping email addresses to payment amounts.\nElements may consist of (ADDR AMOUNT) or (ADDR STRING AMOUNT), where\nADDR is the email address of the intended recipient and AMOUNT is\nthe value of hashcash payment to be made to that user.  STRING, if\npresent, is the string to be hashed; if not present ADDR will be used." (repeat (choice (list :tag "Normal" (string :name "Address") (integer :name "Amount")) (list :tag "Replace hash input" (string :name "Address") (string :name "Hash input") (integer :name "Amount")))) hashcash-default-accept-payment #[0 "\300\207" [20] 1] "The default minimum number of bits to accept on incoming payments." hashcash-accept-resources #[0 "\301BC\207" [user-mail-address (nil)] 2] "An association list mapping hashcash resources to payment amounts.\nResources named here are to be accepted in incoming payments.  If the\ncorresponding AMOUNT is NIL, the value of `hashcash-default-accept-payment'\nis used instead." alist defvaralias hashcash-path hashcash-program (saved-value saved-variable-comment) put make-obsolete-variable "24.4" #[0 "\300\207" [#1="hashcash"] 1 #1#] "The name of the hashcash executable.\nIf this is not in your PATH, specify an absolute file name." (choice (const nil) file) hashcash-extra-generate-parameters #[0 "\300\207" [nil] 1] "A list of parameter strings passed to `hashcash-program' when minting.\nFor example, you may want to set this to (\"-Z2\") to reduce header length." (repeat string) hashcash-double-spend-database #[0 "\300\207" [#2="hashcash.db"] 1 #2#] "The name of the double-spending database file." file hashcash-in-news #[0 "\300\207" [nil] 1] "Specifies whether or not hashcash payments should be made to newsgroups." boolean] 8)
#@55 Alist of asynchronous hashcash processes and buffers.
(defvar hashcash-process-alist nil (#$ . 3061))
(byte-code "\300\301!\210\302\303!\203\304\305\303\"\210\202\304\305\306\"\210\302\307!\203%\304\310\307\"\210\202*\304\310\311\"\210\300\207" [require mail-utils fboundp point-at-bol defalias hashcash-point-at-bol line-beginning-position point-at-eol hashcash-point-at-eol line-end-position] 3)
#@13 

(fn ADDR)
(defalias 'hashcash-strip-quoted-names #[257 "\300!\262\211\203\301\302\"\203\303\304\"\303\305\"P\207\207" [mail-strip-quoted-names string-match "\\`\\([^+@]+\\)\\+[^@]*\\(@.+\\)" match-string 1 2] 5 (#$ . 3471)])
(defalias 'hashcash-token-substring #[0 "\212\300\3012,\211`\302 {P\262\302 b\210\303u\210\304\305!\204 \306\301\"\210\304\305!\203\303u\210\202 \262)\207" ["" --cl-block-nil-- hashcash-point-at-eol 1 looking-at "[ 	]" throw] 4])
#@78 Return the hashcash payment value required for the given address.

(fn ADDR)
(defalias 'hashcash-payment-required #[257 "\302\"\3038\206\211A@\206	\207" [hashcash-payment-alist hashcash-default-payment assoc 2] 4 (#$ . 3951)])
#@75 Return the string with which hashcash payments should collide.

(fn ADDR)
(defalias 'hashcash-payment-to #[257 "\301\"\211A@\206\211@\206\207" [hashcash-payment-alist assoc] 4 (#$ . 4191)])
#@82 Generate a hashcash payment by finding a VAL-bit collision on STR.

(fn STR VAL)
(defalias 'hashcash-generate-payment #[514 "\211\302V\203-\203-r\303\304!q\210\305 \210\306\307\310\311\310\312\313\314\315\n!	&\210eb\210\316 )\207\317\320!\207" [hashcash-program hashcash-extra-generate-parameters 0 get-buffer-create " *hashcash*" erase-buffer apply call-process nil t "-m" "-q" "-b" number-to-string hashcash-token-substring error "No `hashcash' binary found"] 14 (#$ . 4394)])
#@162 Generate a hashcash payment by finding a VAL-bit collision on STR.
Return immediately.  Call CALLBACK with process and result when ready.

(fn STR VAL CALLBACK)
(defalias 'hashcash-generate-payment-async #[771 "\303V\203&\203&\304\305\306\307\310\311\312\313\n!	&\n\211pB\nB\314\"\207\211\307\211\"\207" [hashcash-program hashcash-extra-generate-parameters hashcash-process-alist 0 apply start-process "hashcash" nil "-m" "-q" "-b" number-to-string set-process-filter] 14 (#$ . 4888)])
#@63 Check the validity of a hashcash payment.

(fn TOKEN STR VAL)
(defalias 'hashcash-check-payment #[771 "\203\302\303\211\211\304\305\306	\307\310!\311
&
\312U\207\313\314!\210\315\316!\210\303\207" [hashcash-program hashcash-double-spend-database call-process nil "-c" "-d" "-f" "-b" number-to-string "-r" 0 message "No hashcash binary found" sleep-for 1] 17 (#$ . 5391)])
#@58 Find the format version of a hashcash token.

(fn TOKEN)
(defalias 'hashcash-version #[257 "\211\300H\301\232\203\n\302\207\211\303H\301\232\203\304\207\305\306!\207" [1 58 1.2 6 1.1 error "Unknown hashcash format version"] 3 (#$ . 5778)])
#@74 Check for hashcash token to RECIPIENT in current buffer.

(fn RECIPIENT)
(defalias 'hashcash-already-paid-p #[257 "\212\214\301 \210\302\303!\304\211;\205\305\306!\")\262*\207" [case-fold-search message-narrow-to-headers-or-head message-fetch-field "x-hashcash" t string-match regexp-quote] 5 (#$ . 6027)])
#@75 Insert X-Payment and X-Hashcash headers with a payment for ARG.

(fn ARG)
(defalias 'hashcash-insert-payment #[257 "\300!?\205\301\302!\303!\"\211\205\304\305\306#\262\207" [hashcash-already-paid-p hashcash-generate-payment hashcash-payment-to hashcash-payment-required insert-before-markers "X-Hashcash: " "\n"] 6 (#$ . 6346) "sPay to: "])
#@132 Insert X-Payment and X-Hashcash headers with a payment for ARG
Only start calculation.  Results are inserted when ready.

(fn ARG)
(defalias 'hashcash-insert-payment-async #[257 "\300!?\205\301\302!\303!p\304\305\306\307\310!\311\"\312\313%\262#\207" [hashcash-already-paid-p hashcash-generate-payment-async hashcash-payment-to hashcash-payment-required make-byte-code 514 "\301\300#\207" vconcat vector [hashcash-insert-payment-async-2] 6 "\n\n(fn PROCESS PAYMENT)"] 11 (#$ . 6703) "sPay to: "])
#@27 

(fn BUFFER PROCESS PAY)
(defalias 'hashcash-insert-payment-async-2 #[771 "\301!\205rq\210\212\214\302\236\"\303 \210\211\205\304\305\"+\207" [hashcash-process-alist buffer-live-p delq message-goto-eoh insert-before-markers "X-Hashcash: "] 6 (#$ . 7215)])
#@117 Delete any hashcash processes associated with BUFFER.
BUFFER defaults to the current buffer.

(fn &optional BUFFER)
(defalias 'hashcash-cancel-async #[256 "\211\204p\262\301\302\"\211\262\205\303@!\210\304\"\202\207" [hashcash-process-alist nil rassq delete-process delq] 5 (#$ . 7490) nil])
#@125 Wait for asynchronous hashcash processes in BUFFER to finish.
BUFFER defaults to the current buffer.

(fn &optional BUFFER)
(defalias 'hashcash-wait-async #[256 "\211\204p\262\301\302\"\211\262\205\303@\304\"\210\202\207" [hashcash-process-alist nil rassq accept-process-output 1] 5 (#$ . 7803) nil])
#@80 Return non-nil if hashcash processes in BUFFER are still running.

(fn BUFFER)
(defalias 'hashcash-processes-running-p #[257 "\301\"\207" [hashcash-process-alist rassq] 4 (#$ . 8121)])
#@60 Ask user whether to wait for hashcash processes to finish.
(defalias 'hashcash-wait-or-cancel #[0 "\300p!\205\301\302!\203\303 \207\304 \207" [hashcash-processes-running-p y-or-n-p "Hashcash process(es) still running; wait for them to finish? " hashcash-wait-async hashcash-cancel-async] 2 (#$ . 8314) nil])
#@66 Verify a hashcash payment.

(fn TOKEN &optional RESOURCE AMOUNT)
(defalias 'hashcash-verify-payment #[769 "\302\303\"\304!\305W\203\211A@\202+\306@!\211\307\267\202(\3108\202)\3118\202)\312\262\204I\313\"\211\205D\314@A@\206C	#\262\202\\\232\203[\314\206W	#\202\\\312\207" [hashcash-accept-resources hashcash-default-accept-payment split-string ":" hashcash-version 1.2 string-to-number #s(hash-table size 2 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 28 1 34)) 2 3 nil assoc hashcash-check-payment] 10 (#$ . 8632)])
#@247 Add X-Payment: and X-Hashcash: headers with a hashcash payment
for each recipient address.  Prefix arg sets default payment temporarily.
Set ASYNC to t to start asynchronous calculation.  (See
`mail-add-payment-async').

(fn &optional ARG ASYNC)
(defalias 'mail-add-payment #[512 "\203\n\302!\202\303\212\214\304 \210\305\306\307\303\310#!\305\306\311\303\310#!\305\306\312\303\310#!\2032\313\314\"\262\203>\313\314\"\244\262	\203N\211\203N\313\314\"\244\262\266\211\203a\315\203]\316\202^\317\"\210+\266\310\207" [hashcash-default-payment hashcash-in-news prefix-numeric-value nil message-narrow-to-headers hashcash-strip-quoted-names mail-fetch-field "To" t "Cc" "Newsgroups" split-string ",[ 	\n]*" mapc hashcash-insert-payment-async hashcash-insert-payment] 11 (#$ . 9212) "P"])
#@187 Add X-Payment: and X-Hashcash: headers with a hashcash payment
for each recipient address.  Prefix arg sets default payment temporarily.
Calculation is asynchronous.

(fn &optional ARG)
(defalias 'mail-add-payment-async #[256 "\300\301\"\207" [mail-add-payment t] 4 (#$ . 10031) "P"])
#@123 Look for a valid X-Payment: or X-Hashcash: header.
Prefix arg sets default accept amount temporarily.

(fn &optional ARG)
(defalias 'mail-check-payment #[256 "\211\203\n\301!\202\302\303\304\305\"!\212eb\210\306\307!\210\310 \210`\311eb\210\211\204H\306\312\313#\203H\314\315 \316\"\211@\317!\232\203D\320A@!\262\210\202#eb\210\211\204`\306\321\313#\203`\320\315 !\262\202K\211\203h\322\323!\210\262*\207" [hashcash-default-accept-payment prefix-numeric-value hashcash-version hashcash-generate-payment "x" 1 search-forward "\n\n" beginning-of-line nil "X-Payment: hashcash " t split-string hashcash-token-substring " " number-to-string hashcash-verify-payment "X-Hashcash: " message "Payment valid"] 9 (#$ . 10324) "P"])
(provide 'hashcash)

Zerion Mini Shell 1.0