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 Aug 20Pushed 9mo 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 1mo 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

15

—

LowBetter than 3% of packages

Maintenance41

Moderate activity, may be stable

Popularity1

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/777e065c03a0b18fefb286b7c6830ea60e5eaa3720886123a89a38547404d609?d=identicon)[alvar27](/maintainers/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

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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