PHP code example of ict / secrets

1. Go to this page and download the library: Download ict/secrets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ict / secrets example snippets



use Ict\Secrets\Vault\VaultStorageInterface;

..........

public function __construct(    
    private readonly VaultStorageInterface $vaultStorage
)

$this->vaultStorage->storeKeys('your_encription_keys_name')->storeSecret('your_secret_name', 'your_secret_value');

$secretVal = $this->vaultStorage->getSecret($secretKey)

$secretVal = $this->vaultStorage->removeSecret($secretKey)