jeffreyvanrossum / wp-simple-encryption
允许简单字符串加密和解密的包。
0.1.0
2023-09-12 12:36 UTC
Requires
- php: ^7.4|^8.0
- defuse/php-encryption: ^2.4
Requires (Dev)
- laravel/pint: ^1.4
- spatie/ray: ^1.36
README
WP Simple Encryption
一个用于WordPress中字符串加密和解密的简单包。
安装
composer require jeffreyvanrossum/wp-simple-encryption
工作原理
此包尝试将一个常量写入您的站点 wp-config.php
文件中,其中存储着密钥。
您可以在实例化 WPSimpleEncryption
类时定义此常量的名称。
此包使用 php-encryption 进行加密和解密。
用法
use Jeffreyvr\WPSimpleEncryption\WPSimpleEncryption; $wp_simple_encryption = new WPSimpleEncryption('YOUR_SECRET_KEY_CONSTANT'); $wp_simple_encryption->encrypt('some unencrypted string'); $wp_simple_encryption->decrypt('some encrypted string');
贡献者
许可证
MIT。请参阅 许可证文件 了解更多信息。