由于项目要求,要使用gpg加解密技术,于是下载了gpg4win-2.1.0.exe,可是安装后kleopatra.exe怎么也运行不了,然后在网上查资料,大家都说控制面板修改语言为英语(美国),可是我试过以后依然不行,但还是可以用指令去加解密文件,然后找到了一篇好文章,解决了我的大部分疑惑。
生成密钥:
C:\Documents and Settings\admin>gpg --gen-key //输入此命令
gpg (GnuPG) 2.0.17; Copyright (C) 2011 Free Software Foundation, Inc
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 1 //只有1可以用于加密,其它用于签名
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) // 选择密码的位数,位数越大越安全,但速度慢
Requested keysize is 2048 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 0 //根据实际情况选择密钥时限 0表示永久
Key does not expire at all
Is this correct? (y/N) y //确认
GnuPG needs to construct a user ID to identify your key.
Real name: myname //请输入真实姓名,以后会用到
Email address: myemail@server.com //输入邮箱,不能重复
Comment: comment //可以为空
You selected this USER-ID:
"raolin (use for GPG Encrypt) <myrl1023@126.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o //输入o确认
You need a Passphrase to protect your secret key. //输入两次密码
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime gener