PHPackages                             msolutions/file-access-encryptor - 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. msolutions/file-access-encryptor

ActiveLibrary

msolutions/file-access-encryptor
================================

Encrypt your real file path with expiry

v1.0.1(3y ago)03MITPHPPHP ^7.4|^8.0|^8.1

Since May 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mufaadsoft/FileAccessEncryptor)[ Packagist](https://packagist.org/packages/msolutions/file-access-encryptor)[ RSS](/packages/msolutions-file-access-encryptor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel File Access Encryptor
=============================

[](#laravel-file-access-encryptor)

Version 1.0
-----------

[](#version-10)

This library will support you to hide/prevent accessing files through the real location

Features
--------

[](#features)

- Hide your files real location
- URL expiration
- Regenerate secure unique urls

### Installation

[](#installation)

```
composer require msolutions/file-access-encryptor

```

### Implementing

[](#implementing)

```
use MSL\FileAccessEncryptor;

/*initialize the class inside your
 *constructor or any other function before using
 **/
public function __constructor()
{
    new FileAccessEncryptor();
}

//Generate encrypted token for your files
$realFilePath = '/path/pdf/mypdf.pdf';
$urlExpirationTime = 60; //60 seconds (apply the time in seconds)
$encryptedToken = FileAccessEncryptor::encryptRealPath($realFilePath, $urlExpirationTime);

```

### Decrypting Token

[](#decrypting-token)

```
use MSL\FileAccessEncryptor;

/*initialize the class inside your
 *constructor or any other function before using
 **/
public function __constructor()
{
    new FileAccessEncryptor();
}

//decrypt the token and get the real file path
FileAccessEncryptor::name("Give-Some-File-Name"); //optional

//encryption value mutation to get the real url (optional)
FileUrlEncryptor::mutateRealPath(function($value){
            return $value+1;
});

//Preview the file (if need to preview the secure object)
$encryptedToken = 'ENC-TOKEN';
FileAccessEncryptor::type("pdf"); //[pdf, jpg, jpeg] parse here your file type for preview purpose
FileUrlEncryptor::preview($encryptedToken);

//decrypt and get the real file path and expiry status
$encryptedToken = 'ENC-TOKEN';
$result = FileAccessEncryptor::decryptRealPath($encryptedToken);
/*
return ["status" => "valid", "path" => "/path/for-real-file.pdf"];

OR

return ["status" => "expired", "path" => null];
*/

```

This open source package is developed for general use, any of developers can use this for free.

- Please share your comments and ideas to improve the package.

FileAccessEncryptor
===================

[](#fileaccessencryptor)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~3 days

Total

2

Last Release

1454d ago

### Community

Maintainers

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

---

Top Contributors

[![mufaad-dev](https://avatars.githubusercontent.com/u/60340194?v=4)](https://github.com/mufaad-dev "mufaad-dev (16 commits)")[![ziakn](https://avatars.githubusercontent.com/u/50925153?v=4)](https://github.com/ziakn "ziakn (1 commits)")

---

Tags

Hide real file pathPath expiryUnauthorized file access preventionlaravel libmsolutions.lkmsolutions

### Embed Badge

![Health badge](/badges/msolutions-file-access-encryptor/health.svg)

```
[![Health](https://phpackages.com/badges/msolutions-file-access-encryptor/health.svg)](https://phpackages.com/packages/msolutions-file-access-encryptor)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M339](/packages/yajra-laravel-datatables-oracle)[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[laravel/breeze

Minimal Laravel authentication scaffolding with Blade and Tailwind.

3.0k31.3M148](/packages/laravel-breeze)

PHPackages © 2026

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