Download the PHP package hxm/media-encrypt without Composer

On this page you can find all versions of the php package hxm/media-encrypt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package media-encrypt

Laravel 7.x/8.x/9.x/10.x Donate

Media Encrypt

Media Encrypt is a powerful PHP package designed for encrypting sensitive data before storing it in a database. This package provides a secure solution to protect your critical data from unauthorized access.

Installation

You can install this package via Composer with the following command:

After successfully installing the Media Encrypt package, you need to perform some configuration steps to start using it in your project.

  1. Publish Config File: You can publish the configuration file to customize the settings according to your specific requirements by running the following command:

    The configuration file will be published to config/media-encrypt.php.

  2. Migrate Database: After the configuration is done, you need to run the migrate command to create the necessary tables in the database:

Usage

To use the Media Encrypt package in your Laravel project, you can refer to the following example code:

  1. Inherit CanMediaEncryptInterface in your Model, then use the HasMediaEncrypt trait in it.

  2. Define: To define the field you want to use with the Media Encrypt data, you just need to add it to the $casts attribute in the model itself. Here is the complete code for your Model:

    • The MediaEncryptCast will encode the data into one block.
    • the MultiMediaEncryptCast will understand that your data is stored in the form of an Array, with each sub-element being encrypted separately. If your data is a Media file data array, you must use this cast
  3. Encrypt and store data:

  4. Access the encrypted data:

    • When accessing the property, you will receive an instance of HXM\MediaEncrypt\Models\MediaEncrypt
    • The Media file data will be encrypted and stored in the database, so after decryption, we will return it to the base64 code of the content.
    • Raw data such as text, array will be encrypted and returned unchanged.
  5. Append: If you want to append the decrypted data, simply add the fields you want to the $appends attribute of the Model:

Contribution

If you encounter any issues or have any suggestions for improvements, please open an issue on GitHub here. We welcome contributions from the community.

License

The Media Encrypt package is distributed under the MIT License. Please refer to the LICENSE file for detailed information about this license.

Contact

If you have any questions, please feel free to contact us via email at [email protected]. We will try to respond as soon as possible.

HoanXuanMai

We hope that the Media Encrypt package will help you secure your important data effectively. Thank you for using our package!


All versions of media-encrypt with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
laravel/framework Version ^7.0|^8.0|^9.0|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hxm/media-encrypt contains the following files

Loading the files please wait ....