定制 91ahmed/secure-cogs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

91ahmed/secure-cogs

最新稳定版本:v1.0

Composer 安装命令:

composer require 91ahmed/secure-cogs

包简介

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.

README 文档

README

SecureCogs is a PHP package for securely storing application data as encrypted key-value pairs, ideal for storing (credentials, secrets, tokens).

Features

  • Encrypted key-value storage in flat files.
  • Customizable encryption algorithm, key, and IV.
  • Returns data as PHP array — easy to integrate.
  • No external dependencies beyond standard PHP + composer autoload.

Composer Installation

composer require 91ahmed/secure-cogs

Usage Example

require 'vendor/autoload.php';

// Create (or load) a config file (filename without extension)
$config = new \SecureCogs\Cogs("path/to/secure_config");

// Set a new key-value pair
$config->set('key', 'value');

// Update an existing key
$config->edit('key', 'new value');

// Delete a key
$config->delete('key');

// Get all stored data (decrypted)
$data = $config->data();
print_r($data);

Advanced: Custom Encryption Method

$config = new \SecureCogs\Cogs("path/to/secure_config");

// Change encryption settings
$config->method('AES-256-CBC');
$config->key('your-very-strong-key-here');
$config->iv('your-initialization-vector');

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-06