emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EasyPG API and usage questions (was: Suggestion: epa-file-select-keys sh


From: Ted Zlatanov
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
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

On Fri, 29 Feb 2008 13:07:39 +0900 Daiki Ueno <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]