2017 © Pedro Peláez
 

library inner-cryptography

simple cryptography service

image

qbonaventure/inner-cryptography

simple cryptography service

  • Saturday, November 19, 2016
  • by QBonaventure
  • Repository
  • 1 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Inner-Cryptography

Introduction

This service provides methods to encrypt/decrypt datas, both in a simple way or with a stronger hash comparison., (*1)

Requirements

Installation

Main Setup

  1. Clone this project into your ./vendor/ directory.

With composer

```json
"require": {
    // ...
    "qbonaventure/Inner-Cryptography": "dev-master"
}
"autoload": {
    "psr-4": {// ...
        "QBonaventure\\InnerCryptography\\": "vendor/qbonaventure/inner-cryptography/src/"
    }
}
```

Post installation

  1. Enabling it in your {application|module}.config.phpfile., (*2)

    <?php
    return array(
        // ...
        'service_manager' => array(
            'factories' => array(
                // ...
                'CryptographyInterface' => 'QBonaventure\InnerCryptography\ServiceFactory', 
            ),
        ),
        // ...
    );
    
  2. Copy config/cryptography.global.php.dist to your config directory, (*3)

  3. Remove the .dist extension from these files and fill in the blanks (see "Configuration")

Configuration

```php
<?php
return array(
    'cryptography' => array(
        'key'   => '',
        'iv'    => '',
        'method'    => 'aes-512-cbc',
        'hashAlgo'  => 'sha256',
        'hashCost'      => null,
    ),
);
```
  • "key" must be a long string of random letters and numbers, like 200+
  • "iv" is a vector that can consisted of about 20 random letters and numbers
  • "method" is the encryption method, default is "aes-512-cbc"
  • "hashAlgo" is the hashing algorithm used for encryption, default is "sha256"
  • "hashCost" is the hash function cost for password_hash(). "null" defaults to the function default : 10

The Versions

19/11 2016

dev-master

9999999-dev https://github.com/QBonaventure/Inner-Cryptography

simple cryptography service

  Sources   Download

BSD-3-Clause

The Requires

  • php ^5.3 || ^7.0

 

zf2 cryptography