PHPackages                             vigihdev/crypto-dev - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. vigihdev/crypto-dev

ActiveLibrary

vigihdev/crypto-dev
===================

Vigih dev crypto

018PHPCI passing

Since Sep 6Pushed 8mo agoCompare

[ Source](https://github.com/vigihdev/crypto-dev)[ Packagist](https://packagist.org/packages/vigihdev/crypto-dev)[ RSS](/packages/vigihdev-crypto-dev/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Crypto Dev
==========

[](#crypto-dev)

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

Features
--------

[](#features)

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

Installation
------------

[](#installation)

```
composer install
```

Usage
-----

[](#usage)

### Generate Keys

[](#generate-keys)

```
# Generate OpenSSL key
php console.php openssl generateKey

# Generate Defuse key
php console.php defuse generateKey
```

### Encrypt Environment Variables

[](#encrypt-environment-variables)

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

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

### Test Decryption

[](#test-decryption)

```
# OpenSSL
php console.php openssl testDecrypt "encrypted_string"

# Defuse
php console.php defuse testDecrypt "encrypted_string"
```

Directory Structure
-------------------

[](#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
--------

[](#security)

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

Requirements
------------

[](#requirements)

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

Author
------

[](#author)

Vigih Dev

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance43

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bace572fc25f16fc80012c44703f3000ac48b1238aa82a6316885749f4bcb47f?d=identicon)[vigihdev](/maintainers/vigihdev)

---

Top Contributors

[![vigihdev](https://avatars.githubusercontent.com/u/95208065?v=4)](https://github.com/vigihdev "vigihdev (12 commits)")

### Embed Badge

![Health badge](/badges/vigihdev-crypto-dev/health.svg)

```
[![Health](https://phpackages.com/badges/vigihdev-crypto-dev/health.svg)](https://phpackages.com/packages/vigihdev-crypto-dev)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
