我需要爲unix機器創建一個公鑰來向我發送加密數據。用電子郵件創建bouncycastle PGPSecretKey
我所做的是使用以下構造函數來創建PGPSecreyKey。
PGPSecretKey secretKey = new PGPSecretKey(PGPSignature.DEFAULT_CERTIFICATION, PGPPublicKey.RSA_GENERAL, publicKey, privateKey, new Date(),
"Test [email protected]", PGPEncryptedData.CAST5, passPhrase, null, null, new SecureRandom(), "BC");
當用Kleopatra打開(檢查我的證書)時,我看到名稱:「Test [email protected]」和Email:「」。
如何使用名稱和電子郵件創建PGP密鑰(並在可能的情況下發表評論)。
在此先感謝!