红联Linux门户
Linux帮助

Encrypting a file in linux

发布时间:2008-02-27 01:52:16来源:红联作者:Dnirta
To encrypt single file, use command gpg as follows:
$ gpg -c filename

To encrypt myfinancial.info file, type the command:
$ gpg -c myfinancial.info
Output:

Enter passphrase:Repeat passphrase:
This will create a myfinancial.info.gpg file.
Option:

-c : Encrypt with symmetric cipher.
Caution if you ever forgot your password aka passphrase, you cannot recover the data as it use very strong encryption.

Task: decrypt file
To decrypt file use gpg command:
$ gpg myfinancial.info.gpg
Output:

gpg myfinancial.info.gpggpg: CAST5 encrypted dataEnter passphrase:
文章评论

共有 0 条评论