定制 vigihdev/crypto-dev 二次开发

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

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

vigihdev/crypto-dev

Composer 安装命令:

composer require vigihdev/crypto-dev

包简介

Vigih dev crypto

README 文档

README

Library PHP untuk enkripsi dan dekripsi menggunakan OpenSSL dan Defuse Crypto.

Features

  • ✅ OpenSSL encryption/decryption
  • ✅ Defuse Crypto encryption/decryption
  • ✅ Console commands untuk key generation
  • ✅ Environment variable encryption
  • ✅ Secure key storage

Installation

composer install

Usage

Generate Keys

# Generate OpenSSL key
php console.php openssl generateKey

# Generate Defuse key  
php console.php defuse generateKey

Encrypt Environment Variables

# OpenSSL
php console.php openssl writeEnvEncrypt --DB_PASSWORD=secret123

# Defuse
php console.php defuse writeEnvEncrypt --API_KEY=myapikey

Test Decryption

# OpenSSL
php console.php openssl testDecrypt "encrypted_string"

# Defuse  
php console.php defuse testDecrypt "encrypted_string"

Directory Structure

src/
├── Console/           # Console commands
├── Exception/         # Custom exceptions
├── CryptoOpenssl.php  # OpenSSL crypto class
└── CryptoDefuse.php   # Defuse crypto class

config/
└── secrets/          # Key storage (auto-created)

tests/                # Unit tests

Security

  • Keys disimpan dengan permission 0600
  • Secrets directory dengan permission 0700
  • Gunakan environment variables untuk sensitive data

Requirements

  • PHP 8.0+
  • OpenSSL extension
  • Defuse/php-encryption

Author

Vigih Dev

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固