OpenPGP Form Encryption for WordPress
View this plugin on the WordPress Plugin Directory: OpenPGP Form Encryption for WordPress
This plugin uses OpenPGP.js 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.
To install this plugin, follow these directions:
- Download the latest zip file from the releases page.
- Next, load up your WordPress blog’s dashboard, and go to Plugins > Add New.
- Upload the zip file.
- Click Activate.
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, which has instructions for multiple operating systems.
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.
cryptbutton shortcode takes the following arguments.
- The media ID of your ASCII-armored public key. Either this or
- The URL for your ASCII-armored public key. Either this argument or
- Optional. The HTML ID for the
textareaelement to be encrypted. If this is unspecified, the correct
textareawill try to be guessed. Usually this is successful.
- Optional. Specify additional CSS classes for the button element.
- Optional. Specify additional CSS styles for the button element.
- Optional. Specify the button text. This defaults to “Encrypt”. You can also use the shortcode as an opening and closing tag, with the contents used as the button’s text.
1 2 3 4 5 6 7
[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. 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:
[cryptbutton keyid:42 "Encrypt"] [submit "Send"]
For support and bug reports, please visit the GitHub project page.