There is no license information available for the latest version (1.0.0) of this package.

Secrets Repository

1.0.0 2025-06-29 12:21 UTC

This package is auto-updated.

Last update: 2025-06-29 15:46: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');