;ELC   
;;; Compiled
;;; in Emacs version 29.4
;;; with all optimizations.



(byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\314DD\315\316\317%\210\310\320\312\313\321DD\322\316\323%\210\310\324\312\313\325DD\326\316\327%\207" [require sha1 custom-declare-group canlock nil "The Cancel-Lock feature." :group news custom-declare-variable canlock-password funcall function #[0 "\300\207" [nil] 1 #1=""] "Password to use when signing a Cancel-Lock or a Cancel-Key header." :type (radio (const :format "Not specified " nil) (string :tag "Password")) canlock-password-for-verify #[0 "\207" [canlock-password] 1 #1#] "Password to use when verifying a Cancel-Lock or a Cancel-Key header." (radio (const :format "Not specified " nil) (string :tag "Password")) canlock-force-insert-header #[0 "\300\207" [nil] 1 #1#] "If non-nil, insert a Cancel-Lock or a Cancel-Key header even if the\nbuffer does not look like a news message." boolean] 6)#@86 Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes.

(fn MESSAGE)
(defalias 'canlock-sha1 #[257 "\300\301\211\302$\207" [sha1 nil binary] 6 (#$ . 963)])#@53 Make a Cancel-Key header.

(fn MESSAGE-ID PASSWORD)
(defalias 'canlock-make-cancel-key #[514 "\211G\300V\203\f \301!\262\211\302\303GZ\304\"P\262\305\306\307#\305\310\307#\311\301\301P!P!!\207" [20 canlock-sha1 make-string 64 0 mapconcat #[257 "\300\301\302\"!\207" [char-to-string logxor 54] 5 "\n\n(fn BYTE)"] "" #[257 "\300\301\302\"!\207" [char-to-string logxor 92] 5 "\n\n(fn BYTE)"] base64-encode-string] 10 (#$ . 1141)])#@47 Narrow the buffer to the head of the message.
(defalias 'canlock-narrow-to-header #[0 "\302eb\303\304\305\306	!\"\302\307#\203 \310\224\202 db})\207" [case-fold-search mail-header-separator nil re-search-forward format "^$\\|^%s$" regexp-quote t 0] 6 (#$ . 1586)])#@66 Delete Cancel-Key or Cancel-Lock headers in the narrowed buffer.
(defalias 'canlock-delete-headers #[0 "\301eb\210\302\303\304\301#\205# \305\224\302\306\304\301#\203 \305\224b\202 d|\210\202 )\207" [case-fold-search t re-search-forward "^Cancel-\\(Key\\|Lock\\):" nil 0 "^[^	 ]"] 5 (#$ . 1859)])#@204 Return a list of the values of Cancel-Lock header.
If KEY is non-nil, look for a Cancel-Key header instead.  The buffer
is expected to be narrowed to just the headers of the message.

(fn &optional KEY)
(defalias 'canlock-fetch-fields #[256 "\301\203	 \302\202\n \303!\304\211\305\2059 \306\307\"\262\2037 \310\311\211A\262\242\211\262\"\203 \312\304OB\262\202 \211\237)\207" [case-fold-search mail-fetch-field "Cancel-Key" "Cancel-Lock" nil t split-string "[	\n ,]+" string-match "^sha1:" 5] 8 (#$ . 2166)])#@137 Return a Message-ID in Cancel, Supersedes or Replaces header.
The buffer is expected to be narrowed to just the headers of the
message.
(defalias 'canlock-fetch-id-for-key #[0 "\300\301!\211\205 \302\303\"\205 \304\305\"\262\206  \300\306!\206  \300\307!\207" [mail-fetch-field "Control" string-match "^cancel[	 ]+\\(<[^	\n @<>]+@[^	\n @<>]+>\\)" match-string 1 "Supersedes" "Replaces"] 4 (#$ . 2696)])#@110 Insert a Cancel-Key and/or a Cancel-Lock header if possible.

(fn &optional ID-FOR-KEY ID-FOR-LOCK PASSWORD)
(defalias 'canlock-insert-header #[768 "\302\211\211\211\212\214\303 \210\206 \304\305!\211\262\203D \204 \306 \262\304\307!\211\262\2035 \310\311\"\2035 \302\262\202> \204> \304\312!\262\313 \210db\210)\205\265 \204X \204X \314\315!\202\265 \204e 	\206c \316\317!\262;\203q G\320U\203w \314\321!\202\265 \205\202 \322\"\262\205\216 \322\"\262\204\236 \211\204\236 \314\323!\202\265 \203\250 \324\325\261\210\211\205\265 \326\327\330!!\325\261)\207" [canlock-force-insert-header canlock-password nil canlock-narrow-to-header mail-fetch-field "Newsgroups" canlock-fetch-id-for-key "Control" string-match "^cancel[	 ]+<[^	\n @<>]+@[^	\n @<>]+>" "Message-ID" canlock-delete-headers message "There are no Message-ID(s)" read-passwd "Password for Canlock: " 0 "Password for Canlock is bad" canlock-make-cancel-key "Couldn't insert Canlock header" "Cancel-Key: sha1:" "\n" "Cancel-Lock: sha1:" base64-encode-string canlock-sha1] 11 (#$ . 3110)])#@147 Verify Cancel-Lock or Cancel-Key in BUFFER.
If BUFFER is nil, the current buffer is assumed.  Signal an error if
it fails.

(fn &optional BUFFER)
(defalias 'canlock-verify #[256 "\301\211\211\211\211\211\211\211\211\212	\203 	q\210\214~\210\302 \210\303\304!\262	\303 \262\2042 \2042 \305\262\202F \306 \262\307\310!\262\204F \204F \311\262*\203R \312\313\"\207\206Y \314\315!\262;\203g G\316U\203k \312\317!\207\203\235 \203\222 \320\"\262\203\222 \211\204\222 	\211A\262\242\230\262\202{ \211\203\232 \321\202\233 \322\262	\301\262\203\324 \203\311 \323\324\320\"!!\262\203\311 \211\204\311 \211A\262\n\242\230\262\211\203\321 \321\202\322 \322\262\322		D\235\205\337 \322	\203\362 \203\362 \325\326#\210\207\203\376 \325\327\n\"\210\207	\203	\325\330\"\210\207" [canlock-password-for-verify nil canlock-narrow-to-header canlock-fetch-fields key "There are neither Cancel-Lock nor Cancel-Key headers" canlock-fetch-id-for-key mail-fetch-field "Message-ID" "There are no Message-ID(s)" error "%s" read-passwd "Password for Canlock: " 0 "Password for Canlock is bad" canlock-make-cancel-key "good" "bad" base64-encode-string canlock-sha1 message "Cancel-Key is %s, Cancel-Lock is %s" "Cancel-Lock is %s" "Cancel-Key is %s"] 15 (#$ . 4204) nil])
(provide 'canlock)
