PHPackages                             fredbradley/google-storage-user-photos-encrypter - 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. fredbradley/google-storage-user-photos-encrypter

ActiveLibrary

fredbradley/google-storage-user-photos-encrypter
================================================

Customer Encrypter for user photos stored in Google Storage for Laravel applications.

1.0.1(6mo ago)010[3 PRs](https://github.com/fredbradley/google-storage-user-photos-encrypter/pulls)MITPHPPHP ^8.3CI passing

Since Oct 25Pushed 1mo agoCompare

[ Source](https://github.com/fredbradley/google-storage-user-photos-encrypter)[ Packagist](https://packagist.org/packages/fredbradley/google-storage-user-photos-encrypter)[ Docs](https://github.com/fredbradley/google-storage-user-photos-encrypter)[ GitHub Sponsors]()[ RSS](/packages/fredbradley-google-storage-user-photos-encrypter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (12)Versions (6)Used By (0)

Custom Encrypter
================

[](#custom-encrypter)

[![Latest Version on Packagist](https://camo.githubusercontent.com/98ba23738fddb7d5edc9d7ac10405ca7c9a1c6180c874f6c6a119c2059644702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66726564627261646c65792f676f6f676c652d73746f726167652d757365722d70686f746f732d656e637279707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/google-storage-user-photos-encrypter)[![GitHub Tests Action Status](https://camo.githubusercontent.com/19ccbb900c3f24708f11e3269279ed04f759e7857601700b81d277ab79fb7db3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f66726564627261646c65792f676f6f676c652d73746f726167652d757365722d70686f746f732d656e637279707465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/fredbradley/google-storage-user-photos-encrypter/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/48c76eec0935f3fed85603b10b66e168e3b3e0ab2d18d28aac11b0eb4daf9e27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f66726564627261646c65792f676f6f676c652d73746f726167652d757365722d70686f746f732d656e637279707465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/fredbradley/google-storage-user-photos-encrypter/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a196f20df4da35378bd1ee561eb431ebc40f7d055d7143c9bfd52e1e1c2f386f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66726564627261646c65792f676f6f676c652d73746f726167652d757365722d70686f746f732d656e637279707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/google-storage-user-photos-encrypter)

A custom encrypter for user photos stored in Google Cloud Storage, for the purpose of being able to encrypt the documents into Google Storage, but use them across multiple Laravel applications with the same encryption keys.

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

[](#installation)

You can install the package via composer:

```
composer require fredbradley/google-storage-user-photos-encrypter
```

You *can* publish the config file with, but it's not necessary to:

```
php artisan vendor:publish --tag="google-storage-user-photos-encrypter-config"
```

You will need to add your `USER_PHOTOS_ENCRYPTION_KEY` and you may want to override the default cipher by adding these two lines to your `.env` file:

```
USER_PHOTOS_ENCRYPTION_KEY=base64:your-base64-encoded-key-here
USER_PHOTOS_ENCRYPTION_CIPHER=AES-256-CBC
```

Usage
-----

[](#usage)

### As a Facade:

[](#as-a-facade)

```
// A check to see whether encrypter status is on. (Just add `USER_PHOTOS_ENCRYPTION_STATUS=on` to your .env to enable it)
if (\FredBradley\GoogleStorageUserPhotosEncrypter\Facades\GoogleStorageUserPhotosEncrypter::active()) {
// returns a bool
}

// Encrypt a value
$encryptedString = \FredBradley\GoogleStorageUserPhotosEncrypter\Facades\GoogleStorageUserPhotosEncrypter::encrypt($string);

// Decrypt a value
$string = \FredBradley\GoogleStorageUserPhotosEncrypter\Facades\GoogleStorageUserPhotosEncrypter::decrypt($encryptedString);
```

### Via Dependency Injection:

[](#via-dependency-injection)

```
public function handle(\FredBradley\GoogleStorageUserPhotosEncrypter\GoogleStorageUserPhotosEncrypter $encrypter)
{
    $string = "test string";

    if ($encrypter::active()) {

        // Encrypt a value
        $encryptedString = $encrypter->encrypt($string);

        // Decrypt a value
        $string = $encrypter->decrypt($encryptedString);
    }

    return $string;
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Fred Bradley](https://github.com/fredbradley)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance79

Regular maintenance activity

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~0 days

Total

2

Last Release

200d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639226?v=4)[Fred Bradley](/maintainers/fredbradley)[@fredbradley](https://github.com/fredbradley)

---

Top Contributors

[![fredbradley](https://avatars.githubusercontent.com/u/1639226?v=4)](https://github.com/fredbradley "fredbradley (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelFred Bradleygoogle-storage-user-photos-encrypter

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fredbradley-google-storage-user-photos-encrypter/health.svg)

```
[![Health](https://phpackages.com/badges/fredbradley-google-storage-user-photos-encrypter/health.svg)](https://phpackages.com/packages/fredbradley-google-storage-user-photos-encrypter)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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