jeffreyvanrossum/wp-simple-encryption

Package to allow for simple string encryption and decryption.

0.1.0 2023-09-12 12:36 UTC

This package is auto-updated.

Last update: 2024-10-28 17:17:58 UTC


README

vanrossum.dev Logo

Total Downloads Latest Stable Version License

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.