Skip to content

Protect your application's configuration settings by storing them in an encrypted plain text file to ensure both security and accessibility.

License

Notifications You must be signed in to change notification settings

91ahmed/SecureCogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureCogs is a PHP data storage package that allows you to store data in an encrypted key-value pair format, providing various methods to simplify data accessibility and maintainability.

Composer Installation

composer require 91ahmed/secure-cogs

Example

require ('vendor/autoload.php');

// Set the path to the config file.
// The filename should not include an extension.
$config = new \SecureCogs\Cogs("path\filename");

// Set new data.
$config->set('key', 'value');
// Edit the value of an existing key.
$config->edit('key', 'new value');
// Delete existing key.
$config->delete('key');

Change the Encryption Algorithm

$config = new \SecureCogs\Cogs("path\filename");

// Set your own encryption algorithm / key / iv
$config->method('AES-256-CBC');
$config->key('1a2b813c45f1bH13c29d3812d2e0cfd59db438R029f8287d6f231b2T2079b343');
$config->iv('1982538500398210');

Display the Data in an Array

	
$config = new \SecureCogs\Cogs("path\filename");

// This method will display the data in its form, without encryption.
print_r($config->data());

About

Protect your application's configuration settings by storing them in an encrypted plain text file to ensure both security and accessibility.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages