Title: OpenPGP Form Encryption for WordPress
Author: arnesonium
Published: <strong>2014 年 12 月 1 日</strong>
Last modified: 2024 年 4 月 17 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/openpgp-form-encryption.svg)

# OpenPGP Form Encryption for WordPress

 作者：[arnesonium](https://profiles.wordpress.org/arnesonium/)

[下载](https://downloads.wordpress.org/plugin/openpgp-form-encryption.v1.5.1.zip)

 * [详情](https://cn.wordpress.org/plugins/openpgp-form-encryption/#description)
 * [评价](https://cn.wordpress.org/plugins/openpgp-form-encryption/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/openpgp-form-encryption/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/openpgp-form-encryption/#developers)

 [支持](https://wordpress.org/support/plugin/openpgp-form-encryption/)

## 描述

This plugin uses [OpenPGP.js](http://openpgpjs.org/) to provide public key encryption
for a
 textarea. It is most useful for any kind of text area that will be submitted
via email or over an unsecured network connection.

The GitHub repository for this plugin is located at https://github.com/pymander/
wordpress-openpgp

#### 用法

This plugin provides a simple shortcode which you can add to your
 forms. To use
the shortcode, you must first upload your ASCII-armored public key to your blog’s
media section. Note that the public key must reside on the same server as your blog.

The `cryptbutton` shortcode takes the following arguments.

**keyid**
 The media ID of your ASCII-armored public key. Either this or `keyurl`
are required.

**keyurl**
 The URL for your ASCII-armored public key. Either this argument or keyid
are required.

**textarea**
 Optional. The HTML ID for the textarea element to be encrypted. When
this is omitted, the plugin will try to find the correct textarea automatically.

**class**
 Optional. Specify additional CSS classes for the button element.

**text**
 Optional. Specify the button text. This defaults to “Encrypt”. You can
also use the shortcode as an open/close tag, and the contents will be used as the
button text.

#### 例子

This example uses the [Jetpack for WordPress](http://jetpack.me/) contact form. 
You can
 see an example of the output on my [Contact page](http://arnesonium.com/contact/).
The WordPress code looks something like this:

    ```
    [contact-form subject='ARNESONIUM CONTACT']
    [contact-field label='Name' type='name' required='1'/]
    [contact-field label='Email' type='email' required='1'/]
    [contact-field label='Phone' type='text'/]
    [contact-field label='Comment' type='textarea' required='1'/]
    [cryptbutton keyid=42]Encrypt[/cryptbutton]
    [/contact-form]
    ```

Line 6 displays the cryptbutton usage. Note that I changed some
 elements of this
example to make things clearer. You will need to play with layout and CSS to get
things looking nice.

#### Contact Form 7

This plugin also adds a `cryptbutton` shortcode to
 [Contact Form 7](http://contactform7.com/).
Shortcodes use a slightly different syntax with CF7. All of the options are still
available, but the example above would be used in a form like this:

    ```
    <p>
    [cryptbutton keyid:42 "Encrypt"]
    [submit "Send"]
    </p>
    ```

## 安装

To install this plugin, follow these directions:

 1. Download the latest zip file from [the releases page](https://github.com/pymander/wordpress-openpgp/releases).
 2. Next, load up your WordPress blog’s dashboard, and go to **Plugins > Add New**.
 3. Upload the zip file.
 4. Click **Activate**.

## 常见问题

### How do I get a public key?

OpenPGP for WordPress requires access to an OpenPGP public key in
 ASCII armored
form. For more information on key generation and OpenPGP, I recommend the [Email Self-Defense website](https://emailselfdefense.fsf.org/en/),
which has instructions for multiple operating systems.

## 评价

![](https://secure.gravatar.com/avatar/68f7011d17327b72a04e17a10e619e595550834c1d4e91bc755d5e9caaa5e9e9?
s=60&d=retro&r=g)

### 󠀁[Working with Gravity Forms](https://wordpress.org/support/topic/working-with-gravity-forms/)󠁿

 [Friday Next](https://profiles.wordpress.org/caseyfriday/) 2016 年 11 月 9 日

I needed to create a form to collect bank account / Credit Card numbers from clients,
and I wanted an SSL / PGP combo, and that’s exactly what this plugin gave me. I 
simply: Created a key with GPG Tools (macOS 10.12.1) Right Click -> Export the public
key to the desktop (.asc file) Uploaded that .asc file to the WordPress media library
Found the ID of that uploaded media file (in the URL on the attachment page) Added
the [cryptbutton] shortcode to an HTML block in the Gravity Form And it worked! 
Now I have encrypted data being sent from the website to an email address. Great
plugin!

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/)

## 贡献者及开发者

「OpenPGP Form Encryption for WordPress」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ arnesonium ](https://profiles.wordpress.org/arnesonium/)

[帮助将「OpenPGP Form Encryption for WordPress」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/openpgp-form-encryption)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/openpgp-form-encryption/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/openpgp-form-encryption/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/openpgp-form-encryption/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/openpgp-form-encryption/)。

## 更新日志

#### 1.5.1

 * Escaped outputs to avoid XSS vulnerabilities.
 * Removed ‘style’ option from the cryptbutton shortcode.

#### 1.5.0

 * Fixed support for newer version of Contact Form 7
 * Update to OpenPGP.js 2.6.1 with new API

#### 1.4.0

 * Add support for Contact Form 7

#### 1.3.1

 * Update to OpenPGP.js 1.2.0
 * Fix minor bugs

#### 1.3.0

 * Update to OpenPGP.js 1.0.1
 * Tested against WordPress 4.2.2
 * Robust checks to make sure the browser can support OpenPGP.js

#### 1.2

 * Automatically find textarea for encryption.
 * Fixed possible bug with plaintext modification.
 * Use open and close tags for custom button text.

#### 1.1

 * Prepare everything for inclusion in WordPress Plugin repository.

#### 1.0

 * First release.

#### 0.9

 * Development pre-release.

## 额外信息

 *  版本 **1.5.1**
 *  最后更新：**2 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/openpgp-form-encryption/)
 * 标签
 * [encryption](https://cn.wordpress.org/plugins/tags/encryption/)[forms](https://cn.wordpress.org/plugins/tags/forms/)
   [gnupg](https://cn.wordpress.org/plugins/tags/gnupg/)[openpgp](https://cn.wordpress.org/plugins/tags/openpgp/)
   [pgp](https://cn.wordpress.org/plugins/tags/pgp/)
 *  [高级视图](https://cn.wordpress.org/plugins/openpgp-form-encryption/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/openpgp-form-encryption/reviews/)

## 贡献者

 *   [ arnesonium ](https://profiles.wordpress.org/arnesonium/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/openpgp-form-encryption/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://cash.me/$ErikLArneson)