From 6665f115142fdfae5f38189a05f67132b78e008d Mon Sep 17 00:00:00 2001 From: Brad Cimbura Date: Mon, 19 Feb 2024 11:37:20 -0600 Subject: [PATCH] updated readme added usage instructions --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 178bba0..19a3b01 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,16 @@ To install the package using Composer, run the following command: ```bash composer require hpz937/encryption:1.0.0 ``` + +### Usage +```php +$key = "really_strong_encryption_key"; +$dataEncryptor = new DataEncryptor($key); + +$stringToEncrypt = "data you would like to encrypt" +$encryptedData = $dataEncryptor->encrypt($stringToEncrypt); +var_dump($encryptedData); + +$decryptedData = $dataEncryptor->decrypt($encryptedData); +var_dump(decryptedData); +```