2017 © Pedro Peláez
 

library secure

Encrypt and Decrypt for Slim Framework 3

image

cedvict/secure

Encrypt and Decrypt for Slim Framework 3

  • Tuesday, May 30, 2017
  • by cedvict
  • Repository
  • 1 Watchers
  • 1 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 20 % Grown

The README.md

Encrypt and Decrypt for Slim Framework 3

Based on RSA algorithm for Slim framework. Secure works well as class library (inject) for Slim framework 3 application., (*1)

Install

You can install Logger via composer., (*2)

$ composer require cedvict/secure, (*3)

Requires Slim Framework 3 and PHP 5.5.0 or newer. Visit Secure repository at Packagist., (*4)

Usage

Class Library

To use Secure as class library, you can simply inject Secure instance into Slim container., (*5)

<?php

require "vendor/autoload.php";

$container = new \Slim\Container();

// Adding logger to Slim container
$container['secure'] = function($c) {
  return new Cedvict\Secure('public_key_file', 'private_key_file', 'passphrase');
};

$app = new \Slim\App($container);

$app->get('/', function ($request, $response, $args) {

  // encrypt data before send
  $encData = $this->secure->encrypt("This message from secure class library");
  // decrypt data get
  $realData = $this->secure->decrypt($request->getParam('data'));

  return $response->write($encData . ' - ' . $realData);
});


$app->run();

The Versions

30/05 2017

dev-master

9999999-dev

Encrypt and Decrypt for Slim Framework 3

  Sources   Download

MIT License

The Requires

  • php >=5.3.0

 

by Cedvict Heinz Loknov Doofenschmirtz

30/05 2017

v1.0

1.0.0.0

Encrypt and Decrypt for Slim Framework 3

  Sources   Download

MIT License

by Cedvict Heinz Loknov Doofenschmirtz

30/05 2017

dev-stable

dev-stable https://github.com/cedvict/secure

Encrypt and Decrypt class and middleware for Slim framework 3

  Sources   Download

The Requires

 

by Cedvict Heinz Loknov Doofenshmirtz

middleware encrypt decrypt slim secure