PHPackages                             alvar27/url-dcrypt - 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. [Security](/categories/security)
4. /
5. alvar27/url-dcrypt

ActiveLibrary[Security](/categories/security)

alvar27/url-dcrypt
==================

Library prosedural untuk enkripsi URL secara dinamis dengan AES-256-CBC, SHA3-256, dan Base64

01PHP

Since Jul 27Pushed 12mo agoCompare

[ Source](https://github.com/alvar27/url-dcrypt)[ Packagist](https://packagist.org/packages/alvar27/url-dcrypt)[ RSS](/packages/alvar27-url-dcrypt/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

url-dcrypt
==========

[](#url-dcrypt)

PHP function for dynamic URL encryption and decryption using AES, SHA3, and Base64. This library helps protect your web application from SQL Injection attacks by obfuscating URL parameters in a secure, irreversible way.

📁 Features
----------

[](#-features)

🔒 AES-256-CBC encryption

🛡️ HMAC-based integrity verification (SHA3-256)

🌐 URL-safe Base64 encoding

⚡ Lightweight functional approach (no classes or dependencies)

✅ Easy to integrate into existing PHP projects

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require alvar27/url-dcrypt

```

🔑 Configuration
---------------

[](#-configuration)

Make sure to define a constant SECRET\_KEY before using the functions:

```
define('SECRET_KEY', 'your-32-byte-secret-key-goes-here');

```

The secret key must be exactly 32 bytes for AES-256-CBC. You can use a key generator or hash a passphrase with SHA-256 to ensure proper length.

💡 Usage
-------

[](#-usage)

Using this library is as simple as calling the provided functions for encryption and decryption.

encryption:

```
encrypt_url("your_plaintext")

```

decryption:

```
decrypt_url("your_ciphertext")

```

##### Making the URL More Dynamic

[](#making-the-url-more-dynamic)

To ensure that the encrypted URL is refreshed dynamically (for example, when the user clicks the refresh icon in the browser), include the following function at the end of your HTML page, just like adding JavaScript:

```

```

##### Ciphertext Validation (Optional)

[](#ciphertext-validation-optional)

To prevent errors or decryption failures, you can first verify whether a given value is indeed ciphertext by using:

```
is_ciphertext()

```

Example :

```
if (is_ciphertext($data)) {
    $plaintext = decrypt_url($data);
}

```

👨‍💻 Author
----------

[](#‍-author)

Created by [@alvar27](https://github.com/alvar27)
Feel free to fork, improve, or contribute. Happy coding!

###  Health Score

14

—

LowBetter than 1% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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://avatars.githubusercontent.com/u/221147845?v=4)[alvar27](/maintainers/alvar27)[@alvar27](https://github.com/alvar27)

---

Top Contributors

[![alvar27](https://avatars.githubusercontent.com/u/221147845?v=4)](https://github.com/alvar27 "alvar27 (10 commits)")

### Embed Badge

![Health badge](/badges/alvar27-url-dcrypt/health.svg)

```
[![Health](https://phpackages.com/badges/alvar27-url-dcrypt/health.svg)](https://phpackages.com/packages/alvar27-url-dcrypt)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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