Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffreyvr/wp-simple-encryption
A simple package to encrypt and decrypt strings in WordPress.
https://github.com/jeffreyvr/wp-simple-encryption
php wordpress
Last synced: 17 days ago
JSON representation
A simple package to encrypt and decrypt strings in WordPress.
- Host: GitHub
- URL: https://github.com/jeffreyvr/wp-simple-encryption
- Owner: jeffreyvr
- License: mit
- Created: 2023-09-12T12:32:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-28T16:03:34.000Z (8 months ago)
- Last Synced: 2024-05-02T02:06:24.820Z (7 months ago)
- Topics: php, wordpress
- Language: PHP
- Homepage: https://vanrossum.dev
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# WP Simple Encryption
A simple package to encrypt and decrypt strings in WordPress.
## Installation
```bash
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](https://github.com/defuse/php-encryption/) for the encryption and decryption.
## Usage
```php
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
* [Jeffrey van Rossum](https://github.com/jeffreyvr)
* [All contributors](https://github.com/jeffreyvr/wp-simple-encryption/graphs/contributors)## License
MIT. Please see the [License File](/LICENSE) for more information.