Use Emacs to encrypt files

Source: Internet
Author: User
Tags crypt
For some private files, such as accounts and passwords, it is easy to forget if you do not need to write them down. However, you always feel a little uneasy when writing them down with common files, what if my computer is lost one day?

Emacs supports file encryption. In general, the following methods are useful:

The simplest possible is the Ange-crypt package:
Set the followingCodeAdd to the. emacs file

(Load <span style = "color: # ffa500;"> "Ange-crypt" </span>)

Or run the M-x Ange-crypt-mode command to start this mode.

Easypg should be easy to use. There are also discussions on emacswiki:
Easypg is easy to install. Put the following code in the. emacs file:

<Br/> (require 'epa-file) <br/> (EPA-file-enable) <br/>

In this way, to open or save a file suffixed with. GPG, emacs will prompt you to enter a keyword for encryption.

The following describes some problems that may occur when easypg is used:

If you want to enter the corresponding mode when opening an encrypted file with the. GPG suffix, you only need to add. GPG as the suffix of a common file to the end of a common file name. For example, a file using org mode should have been named test.org. Now I want to encrypt it through Emacs, so I can save it as test.org. GPG, so that the next time you open the file, emacs will automatically enter the corresponding org mode.

If the following error is prompted when easypg is used

<Br/> byte-code: Opening output file: Searching for program, no such file or directory, [...]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.