2017 © Pedro Peláez
 

library cryptee

Pretty easy, fast and secure two-way encryption with PHP.

image

k-gun/cryptee

Pretty easy, fast and secure two-way encryption with PHP.

  • Wednesday, April 26, 2017
  • by k-gun
  • Repository
  • 3 Watchers
  • 5 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 33 % Grown

The README.md

For Cryptee/2.0, PHP/7.4 or newer version is required, but older Cryptee versions (1.0, 1.1, 1.2) work with older PHP versions as well., (*1)

You can install it via Composer using the command below on console:, (*2)

composer require krmgns/cryptee, (*3)

Usage

use Cryptee\Cryptee;

// Keep this key in save!
$key = '4]%gmHo"e:]*hR(NQ?B...';
$str = 'Lorem ipsum dolor.';

$c = new Cryptee($key);
// Or hex way.
// $c = new Cryptee($key, Cryptee::HEX);

$crypted = $c->crypt($str);
$encoded = $c->encode($str);
$decoded = $c->decode($encoded);

printf("Crypted String: %s\n", $crypted);
printf("Encoded String: %s\n", $encoded);
printf("Decoded String: %s\n", $decoded);

// Crypted String: X�/����;���-6�[��
// Encoded String: WJAv2/6x5Du/5IXjLTakW+jr
// Decoded String: Lorem ipsum dolor.

Using Different Keys

// Keep these keys in save!
const FOO_KEY = 'z:W;[*l>Eq.h"t)cs#XhU\+!=S]#q)\yG-...';
const BAR_KEY = 'SNz6@b*/k(iw!plOVeTBWxpL[1$;la|kb2...';

$cFoo = new Cryptee(FOO_KEY);
$cBar = new Cryptee(BAR_KEY);

Generating Keys

You can generate new keys calling Cryptee::generateKey() method with/without $length argument as key length. Default length is 128., (*4)

The Versions

26/04 2017

dev-master

9999999-dev https://github.com/k-gun/cryptee

Pretty easy, fast and secure two-way encryption with PHP.

  Sources   Download

GNU General Public License v3.0

The Requires

  • php >=5.3.0

 

encryption cryptee two-way encryption

26/04 2017

1.1.0

1.1.0.0 https://github.com/k-gun/cryptee

Pretty easy, fast and secure two-way encryption with PHP.

  Sources   Download

GNU General Public License v3.0

The Requires

  • php >=5.3.0

 

encryption cryptee two-way encryption

19/02 2016

v1.0

1.0.0.0 http://github.com/qeremy/cryptee

Pretty easy, fast and secure two-way encryption with PHP.

  Sources   Download

GNU General Public License v3.0

The Requires

  • php >=5.3.0

 

encryption cryptee two-way encryption