Download the PHP package gtt/crypt-bundle without Composer

On this page you can find all versions of the php package gtt/crypt-bundle. 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 crypt-bundle

CryptBundle

Build Status Latest Stable Version License

Provides a simple way to configure Symfony services for data encryption and decryption based on well-known encryption algorithms. With the help of this CryptBundle you can encrypt or decrypt your data as simple as operate with elementary EncryptorInterface or DecryptorInterface:

Implementations of EncryptorInterface or DecryptorInterface would be provided by CryptBundle. The choice of encryption algorithm is up to you - you can specify it in bundle config.

Requirements

Requires only PHP 5.6+ and symfony/framework-bundle.

Installation

Bundle should be installed via composer

After that you need to register the bundle inside your application kernel.

Also you probably need to install specific crypto libraries such as

(You can add the libraries that you need. All of them are optional)

Encryption

Under the hood bundle provides bridges to well-known php components for encrypting data as implementations of encryptor and decryptor interfaces. This implementations are registered as a Symfony services that can be used by your code. See Usage section for details.

Configuration

Bundle configuration defines one or several cryptor-sections grouped by encryption-type (for now supported types are aes and rsa) and the name of the pair of encryptor and decryptor (_aes_binarycryptor, _aes_logcryptor and _rsa_defaultcryptor in example below). Each cryptor-section contains options for defining the pair of encryptor and decryptor of certain encryption type. Tou can turn on automatic encryption for database strings when using doctrine/dbal. You can see example that holds configs for 2 pairs of aes encryptor and decryptor and one pair of rsa encryptor and decryptor and uses rsa_default_cryptor for encrypting database values:

You can see reference of configuration options for supported encryption types:

RSA

AES

Usage

In order to use encryptos and decryptors in your code you have 3 availabilities:

Tag your service (recommended)

The prefered way to receive encryptor or decryptor in you service is to implement in the service's class very simple EncryptorAwareInterface or DecryptorAwareInterface. You can also use traits in most cases if you are too lazy: SingleDecryptorAwareTrait and SingleEncryptorAwareTrait. After that you should tag the service with gtt.crypt.encryptor.aware or gtt.crypt.decryptor.aware tag (depends on whether you want to get encryptor or decryptor) and specify cryptor name in tag attribute cryptor_name. For example if you use configuration such as in Configuration section the _cryptorname attribute value can be one of _aes_binarycryptor, _aes_logcryptor or _rsa_defaultcryptor. The setter injection (setters are defined in EncryptorAwareInterface/DecryptorAwareInterface interfaces) would be done by CryptorInjectorPass.

Inject cryptors directly by service id

Each encryptor or decryptor configured by CryptBundle is a service with id constructed in accordance with the following pattern: gtt.crypt.encryptor.<name> for encryptors and gtt.crypt.decryptor.<name>, where holds corresponding cryptor name defined in bundle config. For example if you use configuration such as in Configuration section the value can be one of _aes_binarycryptor, _aes_logcryptor or _rsa_defaultcryptor. You can simply inject these services in DI-configs of your bundles.

Use cryptor registry

Crypt-bundle also registers CryptorRegistry service with id gtt.crypt.registry that collects all the encryptors and decryptors configured. You can use it to get cryptors by calling getEncryptor or getDecryptor methods with name of the encryptor or decryptor specified. For example if you use configuration such as in Configuration section the name can be one of _aes_binarycryptor, _aes_logcryptor or _rsa_defaultcryptor.

Encrypting database values

When database value encryption is enabled the encrypted_string dbal type is automatically registered. You can use this type inside doctrine entities or direct dbal queries.

Supported encryption components


All versions of crypt-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
symfony/framework-bundle Version ^2.3|^3
symfony/dependency-injection Version ^2.3|^3
symfony/console Version ^2.3|^3
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 gtt/crypt-bundle contains the following files

Loading the files please wait ....