ali-eltaweel / vault
Secrets Repository
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/ali-eltaweel/vault
Requires
- php: ^8.1
- ali-eltaweel/base64-codec: ^1.0.0
- ali-eltaweel/files: ^1.0.0
- ali-eltaweel/lazy-props: ^1.0.0
- ali-eltaweel/openssl-codec: ^1.0.0
- ali-eltaweel/serial-codec: ^1.0.0
This package is auto-updated.
Last update: 2025-10-29 16:32:32 UTC
README
Secrets Repository
Installation
Install vault via Composer:
composer require ali-eltaweel/vault
Usage
Creating Initialization Vectors (IVs)
use Vault\IV\IV; $iv = IV::forMethod('aes-128-gcm');
Saving and Loading Initialization Vectors
$ivFile = new IVFile('path/to/iv/file'); $ivFile->data = $iv;
$ivFile = new IVFile('path/to/iv/file'); $iv = $ivFile->data;
Encrypt IV Files
$encryptionCodec = ...; $ivFile = new IVFile('path/to/iv/file', $encryptionCodec);
Opening Vaults
use Vault\IV\IVFile; use Vault\Vault\Vault; $ivFile = new IVFile('path/to/iv/file'); $vault = new Vault( iv: $ivFile->data, passphrase: 'password', filename: 'path/to/vault/file );
Retrieving (Setting) Value from (to) Vaults
$value->set('key', 'value'); // value can be of any type, the only requirement is that it must be serializable. $value = $vault->get('key');