On Wed, Sep 06, 2000 at 11:17:40PM +0200, Philipp Schulte wrote: > On Wed, Sep 06, 2000 at 10:22:44PM +0200, Wouter Hanegraaff wrote: > > > Hi, > > > > I have some files that I would like to store encrypted. Of course I can > > just type them in, encrypt them using gpg and delete the original, but > > that seems to be a bit of a kludge. It would mean the file is at some > > time readable unencrypted (after saving in the editor), and forgetting > > to turn off the backup file option in the editor when changing the file. > > I solved this problem with a little script: > > #!/bin/bash > gpg .dev.gpg > /dev/null > emacs .dev > rm .dev.gpg > gpg -r "Philipp Schulte" -e .dev > rm .dev > rm .dev~ > a nicer way of doing this would be to write a defun in emacs my-load-file so - it loads a file into a buffer - if the file has certain traits that encrypted files do (ie: GPG headers) pipe it through gpg file (mailcrypt does this nicely). and also write my-save-file which does the opposite - and maybe we keep track of what files have to be encrypted. C-x C-f calls my-load-file C-x C-s calls my-save-file of course emacs needs to be patches to only put its temp files in an encrypted loopback and we index them so we know where they are related. peter 'darkewolf' crystal -- email : firstname.lastname@example.org || email@example.com || firstname.lastname@example.org url : http://cyberpunks.org/darke/homepage.phtml url : http://netverse.sourceforge.net/ url : http://walledcity.sourceforge.net/ gpg key : http://cyberpunks.org/keys/darke_gpg.asc Programming , Webdesign, AI theory, Paranoia, System Administration, Network Design, Problem Solutions A disciple of another sect once came to Drescher as he was eating his morning meal. "I would like to give you this personality test", said the outsider, "because I want you to be happy." Drescher took the paper that was offered him and put it into the toaster, saying: "I wish the toaster to be happy, too."
Description: PGP signature