Title: Fernet Encryption
Author: Hubbard Labs
Published: <strong>2021 年 9 月 2 日</strong>
Last modified: 2025 年 1 月 5 日

---

搜索插件

![](https://ps.w.org/fernet-encryption/assets/banner-772x250.png?rev=2611628)

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

![](https://ps.w.org/fernet-encryption/assets/icon-256x256.png?rev=2611628)

# Fernet Encryption

 作者：[Hubbard Labs](https://profiles.wordpress.org/hubbardlabs/)

[下载](https://downloads.wordpress.org/plugin/fernet-encryption.zip)

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

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

## 描述

Fernet Encryption is a plugin that can be used to encrypt and decrypt data in WordPress
using fernet.

Development was originally sponsered by Access Networks.

### Setup your Key

To setup your key, you need to add the following line to your wp-config file.

    ```
    `
    ```

define( ‘FERNET_KEY’, ‘YOUR_FERNET_KEY’ );
 `

If you choose not to setup your key, you will need to save a copy of the one provided
upon activation of the plugin.

_IMPORTANT: Changing your WordPress salts will invalidate the default Fernet key
provided._

### How to Use

To encrypt data simply use `$token = fernet_encrypt( 'YOUR MESSAGE' )` in your code.

To decrypt the data simply use `fernet_decrypt( $token )` in your code.

You can use the following shortcode to encrypt:

    ```
    [fernet-encrypt]YOUR MESSAGE[/fernet-encrypt]
    ```

You can use the following shortcode to decrypt:

    ```
    [fernet-decrypt]YOUR-FERNET-TOKEN[/fernet-decrypt]
    ```

We have also added useful helper functions:

 * fernet_get_post_meta
 * fernet_add_post_meta
 * fernet_update_post_meta
 * fernet_get_user_meta
 * fernet_add_user_meta
 * fernet_update_user_meta
 * fernet_add_option
 * fernet_get_option
 * fernet_update_option

### Credit

 * Illustrations provided by undraw.co
 * Fernent PHP modified from Kelvin Mo – Fernet-PHP

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ Hubbard Labs ](https://profiles.wordpress.org/hubbardlabs/)
 *   [ Brandon Hubbard ](https://profiles.wordpress.org/bhubbard/)

[帮助将「Fernet Encryption」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/fernet-encryption)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.0.7

 * Readme improvements

#### 1.0.6

 * Add support for WordPress Rest API.
 * Add support for WordPress CLI.

#### 1.0.5

 * Added Helper Functions.

#### 1.0.4

 * Updated Readme

#### 1.0.3

 * Updated Readme.
 * Provided shortcodes for encrypting and decrypting.

#### 1.0.0

 * First release.

## 额外信息

 *  版本 **1.1.0**
 *  最后更新：**1 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 6.4 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/fernet-encryption/)
 * 标签
 * [encryption](https://cn.wordpress.org/plugins/tags/encryption/)[security](https://cn.wordpress.org/plugins/tags/security/)
 *  [高级视图](https://cn.wordpress.org/plugins/fernet-encryption/advanced/)

## 评级

尚未提交反馈。

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

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

## 贡献者

 *   [ Hubbard Labs ](https://profiles.wordpress.org/hubbardlabs/)
 *   [ Brandon Hubbard ](https://profiles.wordpress.org/bhubbard/)

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](https://hubbardlabs.com)