jeffreyvanrossum / wp-simple-encryption
Package to allow for simple string encryption and decryption.
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
A simple package to encrypt and decrypt strings in WordPress.
Installation
composer require jeffreyvanrossum/wp-simple-encryption
How it works
This package attempts to write a constant to your site's wp-config.php
where the secret key is stored.
You may define the name of this constant when instantiating the WPSimpleEncryption
class.
This package utilizes php-encryption for the encryption and decryption.
Usage
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');
Contributors
License
MIT. Please see the License File for more information.