2017 © Pedro Peláez
 

library encrypter

Encrypt and decrypt strings in PHP.

image

codezero/encrypter

Encrypt and decrypt strings in PHP.

  • Wednesday, November 30, 2016
  • by codezero
  • Repository
  • 2 Watchers
  • 1 Stars
  • 9,172 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Encrypter

GitHub release License Build Status Code Coverage Scrutinizer Code Quality Total Downloads, (*1)

ko-fi, (*2)

Encrypt and decrypt strings in PHP.

This package includes an adapter for Laravel's Encrypter that adheres to my Encrypter interface. This can be used in vanilla PHP. Other implementations might be added in the future., (*3)

Installation

Install this package through Composer:, (*4)

composer require codezero/encrypter

Vanilla PHP Implementation

Autoload the vendor classes:, (*5)

require_once 'vendor/autoload.php'; // Path may vary

Choose a key. You will need the same key that was used to encrypt a string, to decrypt it., (*6)

$key = 'my secret key';

And then use the DefaultEncrypter implementation:, (*7)

$encrypter = new \CodeZero\Encrypter\DefaultEncrypter($key);

Usage

Encrypt a string

$encrypted = $encrypter->encrypt('some string');

Decrypt an encrypted string

try {
    $decrypted = $encrypter->decrypt($encrypted);
} catch (\CodeZero\Encrypter\DecryptException $exception) {
    // Decryption failed...
}

Testing

$ composer run test

Security

If you discover any security related issues, please e-mail me instead of using the issue tracker., (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

30/11 2016

dev-master

9999999-dev

Encrypt and decrypt strings in PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Vermeyen

laravel php encrypt encryption

30/11 2016

2.0.0

2.0.0.0

Encrypt and decrypt strings in PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Vermeyen

laravel php encrypt encryption

28/03 2015

1.0.0

1.0.0.0

Encrypt and decrypt strings in PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan Vermeyen

laravel php encrypt encryption