Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

6.5. 例子

6.5.1. 加密文件

加密

			
# echo hello > file.txt
# gpg -c file.txt

       lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
       x Enter passphrase                                    x
       x                                                     x
       x                                                     x
       x Passphrase ****____________________________________ x
       x                                                     x
       x       <OK>                             <Cancel>     x
       mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

       lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
       x Please re-enter this passphrase                     x
       x                                                     x
       x Passphrase ****____________________________________ x
       x                                                     x
       x       <OK>                             <Cancel>     x
       mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
       		
			
# ls file.txt*
file.txt  file.txt.gpg
			

解密

			
# gpg -o myfile -d file.txt.gpg

       lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
       x Enter passphrase                                    x
       x                                                     x
       x                                                     x
       x Passphrase ________________________________________ x
       x                                                     x
       x       <OK>                             <Cancel>     x
       mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
       		
			
comments powered by Disqus