From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: EasyPG API and usage questions (was: Suggestion: epa-file-select-keys should show currently selected keys) Date: Fri, 29 Feb 2008 10:40:35 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <8663w7hg1o.fsf_-_@lifelogs.com> References: <87d4qiaj3j.fsf@broken.deisui.org> <87skzdi3pw.fsf@bzg.ath.cx> <871w6w1k38.fsf@broken.deisui.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204303162 1608 80.91.229.12 (29 Feb 2008 16:39:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Feb 2008 16:39:22 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 29 17:39:48 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JV8GV-0004Nj-Rb for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 17:39:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV8Fz-0004ui-MB for ged-emacs-devel@m.gmane.org; Fri, 29 Feb 2008 11:38:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JV8Fv-0004uV-Oi for emacs-devel@gnu.org; Fri, 29 Feb 2008 11:38:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JV8Fu-0004uH-9N for emacs-devel@gnu.org; Fri, 29 Feb 2008 11:38:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV8Fu-0004uE-6I for emacs-devel@gnu.org; Fri, 29 Feb 2008 11:38:42 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JV8Ft-0001JM-G6 for emacs-devel@gnu.org; Fri, 29 Feb 2008 11:38:41 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JV8Fp-0007NV-AQ for emacs-devel@gnu.org; Fri, 29 Feb 2008 16:38:37 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Feb 2008 16:38:37 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Feb 2008 16:38:37 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:QXI2AG0ima4CK2gzCvbwthb2lhw= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90896 Archived-At: On Fri, 29 Feb 2008 13:07:39 +0900 Daiki Ueno wrote: DU> The library functions of EasyPG are designed to work on strings and DU> files rather than buffers, because implicit data conversion depending on DU> buffer's multibyteness is sometimes an impediment for binary data DU> handling. All functions which have those warnings work on buffers. The DU> buffer based commands also do automatic detection of coding-systems. DU> So I would recommend to use string based API instead of these commands DU> for reliable data handling. Hello, I want to replace encrypt.el with EasyPG in netrc.el (in Gnus and later also in Emacs). Can you explain how to replace this (let ((encryption-model (when (netrc-bound-and-true-p encrypt-file-alist) (encrypt-find-model file)))) (if encryption-model (encrypt-insert-file-contents file encryption-model) (insert-file-contents file))) with the equivalent EasyPG string-based or buffer-based functions? It seems like (insert (epg-decrypt-string ...)) or epa-file-insert-file-contents is the way to do it (probably the second one), but I'd like to be sure I'm following the recommended usage. Should netrc.el use the epa-* or epg-* interface? In addition to writing the code, I have to document the new behavior of netrc.el and explain to its users how to set up an encrypted netrc file. Is there a guide for epa-file.el users that want to use that functionality? The epa.texi file doesn't seem to cover epa-file-name-regexp for example, to explain what will happen with files that match, and how to create such files with various options (see below). By the way, epa-file-name-regexp should be a list of regular expressions and filenames, so the users can add something easily to the list. Generally the EasyPG user documentation is very bare, so I had a hard time understanding how to use it. Is there additional documentation outside of epa.texi? Specifically, as a user I couldn't figure out how to do the following from inside EasyPG: - how do I specify a particular cipher? - how do I specify symmetric encryption? - how do I specify plaintext instead of binary output? - how do I generate a GPG key? (I realize GPG will do it, but epa.texi just says you can import keys without explaining) http://www.easypg.org and http://sourceforge.jp/projects/epg/ had no documentation or mailing lists I could search. I can get some of the answers by reading the source code, but I'm wondering if there's documentation I've missed, and if you can answer these questions where the documentation doesn't. Thanks Ted