added usage instructions
This commit is contained in:
13
README.md
13
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);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user