initial commit
This commit is contained in:
37
README.md
Normal file
37
README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# PhpVaultClient
|
||||
|
||||
## Installation
|
||||
|
||||
To use the `PhpVaultClient` class in your PHP project:
|
||||
|
||||
Setup this registry in your ~/.composer/config.json file:
|
||||
```json
|
||||
{
|
||||
"repositories": [{
|
||||
"type": "composer",
|
||||
"url": "https://git.hpz.pw/api/packages/hpz937/composer"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
To install the package using Composer, run the following command:
|
||||
```
|
||||
composer require hpz937/phpvaultclient
|
||||
```
|
||||
|
||||
### Usage:
|
||||
#### A secure encryption key can be generated with
|
||||
```bash
|
||||
openssl rand -hex 32
|
||||
```
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
$vaultClient = new Hpz\Phpvaultclient\PhpVaultClient();
|
||||
$vaultClient->login('username', 'password');
|
||||
$reponse = $vaultClient->getSecret('cpsql', 'encryption_key');
|
||||
var_dump($reponse);
|
||||
```
|
||||
Reference in New Issue
Block a user