/** * Builds a PublicKeyKeyEncryptionMethodGenerator * for the specified key. */ protected PublicKeyKeyEncryptionMethodGenerator buildPublicKeyEncryptor( Key key) { if (log.isLoggable(Level.INFO)) log.info("using encryption key " + key.getEncryption()); PGPPublicKey publicKey = key.getEncryption().getPublicKey(); return new BcPublicKeyKeyEncryptionMethodGenerator(publicKey); }