Java 类org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator 实例源码

项目:jpgpj    文件:Encryptor.java   
/**
 * 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);
}