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. [Security](/categories/security)
4. /
5. msolutions/file-access-encryptor

ActiveLibrary[Security](/categories/security)

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

Encrypt your real file path with expiry

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

Since May 18Pushed 4y 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 today

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 35% 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

1502d ago

### Community

Maintainers

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

[mews/captcha

Laravel 5/6/7/8/9/10/11/12 Captcha Package

2.6k5.8M89](/packages/mews-captcha)[mews/purifier

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

2.0k18.7M142](/packages/mews-purifier)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M186](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k79](/packages/moonshine-moonshine)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[illuminate/view

The Illuminate View package.

13047.0M2.2k](/packages/illuminate-view)

PHPackages © 2026

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