2017 © Pedro Peláez
 

cakephp-plugin crypt

image

muffin/crypt

  • Wednesday, September 13, 2017
  • by jadb
  • Repository
  • 2 Watchers
  • 5 Stars
  • 76 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 55 % Grown

The README.md

Crypt

Build Status Coverage Total Downloads License, (*1)

CakePHP 3 behavior to allow (a)symmetric encryption/decryption of data by the ORM., (*2)

Special thanks to security experts @ircmaxell & @voodooKobra for [reviewing the work][1]., (*3)

USE AT YOUR OWN RISK., (*4)

Install

Using Composer:, (*5)

composer require muffin/crypt

You then need to load the plugin. You can use the shell command:, (*6)

bin/cake plugin load Muffin/Crypt

or by manually adding statement shown below to bootstrap.php:, (*7)

Plugin::load('Muffin/Crypt');

Usage

By default, the behavior will use the Cake\Utility\Security and not decrypt every find operation. Both configuration could be overridden when setting up the behavior:, (*8)

$this->addBehavior('Muffin/Crypt.Crypt', [
    'fields' => ['cc_number', 'cc_cvv'],
    'strategy' => '\Muffin\Crypt\Model\Behavior\Strategy\AsymmetricStrategy',
    'implementedEvents' => [
        'Model.beforeSave' => 'beforeSave',
        'Model.beforeFind' => 'beforeFind',
    ]
]);

If the fields you are encrypting are of a specific type (i.e. POINT), and if specified when configuring the behavior, the behavior will take care of transforming the data back and forth. If using a custom type, make sure it is added to your table., (*9)

$this->addBehavior('Muffin/Crypt.Crypt', [
    'fields' => ['location' => 'point'],
]);

Patches & Features

  • Fork
  • Mod, fix
  • Test - this is important, so it's not unintentionally broken
  • Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of their own that I can ignore when I pull)
  • Pull request - bonus point for topic branches

To ensure your PRs are considered for upstream, you MUST follow the CakePHP coding standards., (*10)

Bugs & Feedback

http://github.com/usemuffin/crypt/issues, (*11)

License

Copyright (c) 2017, Use Muffin and licensed under The MIT License., (*12)

The Versions

13/09 2017

dev-master

9999999-dev https://github.com/usemuffin/crypt

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp encrypt decrypt encryption cryptography crypt cipher muffin

13/09 2017

0.1.0

0.1.0.0 https://github.com/usemuffin/crypt

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp encrypt decrypt encryption cryptography crypt cipher muffin

28/03 2017

dev-maintainece

dev-maintainece https://github.com/usemuffin/crypt

  Sources   Download

MIT

The Requires

  • ext-openssl *

 

The Development Requires

cakephp encrypt decrypt encryption cryptography crypt cipher muffin

16/01 2016

dev-easyrsa-strategy

dev-easyrsa-strategy https://github.com/usemuffin/crypt

  Sources   Download

MIT

The Requires

  • ext-openssl *

 

The Development Requires

cakephp encrypt decrypt encryption cryptography crypt cipher muffin