原文: [url=http://blog.waterlin.org/articles/using-emacs-to-encry-file.html]用 Emacs 加密文件[/url]
[quote="Dieken"]
;easypg.el===file break point===
;; easypg,emacs 自带
(require 'epa-file)
(epa-file-enable)
;; 总是使用对称加密
(setq epa-file-encrypt-to nil)
;; 允许缓存密码,否则编辑时每次保存都要输入密码
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
;; 允许自动保存
(setq epa-file-inhibit-auto-save nil)
[/quote]
文件名以gpg为后缀
安装 gpg 后,把gpg.exe 的目录放入PATH中
gpg [url=ftp://ftp.gnupg.ca/binary/]一个下载地址[/url]
[quote="Dieken"]
;easypg.el===file break point===
;; easypg,emacs 自带
(require 'epa-file)
(epa-file-enable)
;; 总是使用对称加密
(setq epa-file-encrypt-to nil)
;; 允许缓存密码,否则编辑时每次保存都要输入密码
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
;; 允许自动保存
(setq epa-file-inhibit-auto-save nil)
[/quote]
文件名以gpg为后缀
安装 gpg 后,把gpg.exe 的目录放入PATH中
gpg [url=ftp://ftp.gnupg.ca/binary/]一个下载地址[/url]