PHPackages                             carry0987/sharp - 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. carry0987/sharp

ActiveLibrary

carry0987/sharp
===============

A PHP library for generating signed and encrypted URLs for image processing with Sharp-API, using AES-256-GCM and HMAC-SHA256

1.2.2(2y ago)033MITPHPPHP &gt;=7.4

Since Jan 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/carry0987/PHP-Sharp)[ Packagist](https://packagist.org/packages/carry0987/sharp)[ RSS](/packages/carry0987-sharp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

PHP-Sharp
=========

[](#php-sharp)

[![Packgist](https://camo.githubusercontent.com/ee385a01d2c967909950937159db9d6b311eda6a837111dffeedd9d45d48d7e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6361727279303938372f73686172702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/carry0987/sharp)
A PHP script for generating signed and encrypted URLs for image processing with **[Sharp-API](https://github.com/carry0987/Sharp-API/)**, using AES-256-GCM and HMAC-SHA256.

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

[](#installation)

Use Composer to install PHP-Sharp Image Encryptor in your project:

```
composer require carry0987/sharp
```

Configuration
-------------

[](#configuration)

To use PHP-Sharp, you need to have a signature key, a signature salt, and a source key for encryption and hashing. These should be provided as hexadecimal strings.

Usage
-----

[](#usage)

Below is an example demonstrating how to encrypt an image URL using PHP-Sharp Image Encryptor:

```
require_once 'vendor/autoload.php';

use carry0987\Sharp\Sharp;

// Initialize the keys and salt. Replace these values with your actual keys and salt.
$signatureKey = 'your_hex_signature_key';
$signatureSalt = 'your_hex_signature_salt';
$sourceKey = 'your_hex_source_key';

// Create a new instance of PHP-Sharp Image Encryptor.
$imageEncryptor = new Sharp($signatureKey, $signatureSalt, $sourceKey);

// The URL of the image you want to encrypt.
$originalImageUrl = 'https://example.com/image.jpg';

try {
    // Generate the encrypted and signed URL.
    $signedUrl = $imageEncryptor->generateEncryptedUrl($originalImageUrl);
    echo 'Encrypted and signed URL: ' . $signedUrl;
} catch (\carry0987\Sharp\Exceptions\SharpException $e) {
    // Handle any exceptions during the encryption process.
    echo "Error occurred: " . $e->getMessage();
}
```

Contributing
------------

[](#contributing)

Contributions to PHP-Sharp Image Encryptor are welcome! Feel free to submit pull requests to improve the codebase.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~9 days

Total

7

Last Release

788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f43bad259478092c4ff269518aa9a0c8e91a537a67272877041b4bc1f25cfe8?d=identicon)[carry0987](/maintainers/carry0987)

---

Top Contributors

[![carry0987](https://avatars.githubusercontent.com/u/12984973?v=4)](https://github.com/carry0987 "carry0987 (11 commits)")

---

Tags

sharp-api

### Embed Badge

![Health badge](/badges/carry0987-sharp/health.svg)

```
[![Health](https://phpackages.com/badges/carry0987-sharp/health.svg)](https://phpackages.com/packages/carry0987-sharp)
```

PHPackages © 2026

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