2017 © Pedro Peláez
 

library mysqlaes

Support AES-256 encrypt and decrypt class APIs

image

joungkyun/mysqlaes

Support AES-256 encrypt and decrypt class APIs

  • Friday, March 2, 2018
  • by Joungkyun
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

PHP mysqlAES class library

Abstract

mysqlAES package supports AES 128/192/256 encryptioin, and this API is compatible with lib_mysqludf_aes256 MySQL UDF and mysqlAES javascript API., (*1)

Also, this api supports hex and unhex API that is compatble with MySQL and MariaDB., (*2)

If encrypt with 128bit, this api is operate in the same way with AES_ENCRYPT and AES_DECRYPT of MySQL or MariaDB., (*3)

License

BSD 2-Clause, (*4)

Installation

mysqlAES 2.x works with PHP 7.1 and later. Use mysqlAES-1 branch or 1.x version for use with PHP 7.0 and before. The mysqlAES-1 branch also supports php 7 and later., (*5)

mysqlAES package needs follow external libraries., (*6)

  1. php openssl extension

And, you can install in three ways that are download source files by hands or using pear command or use composer. If you choose to install manually, you will also need to install the required external libraries yourself. Therefore, it is recommended to use the pear command to reduce this effort., (*7)

* Download source files

  1. download latest version at release page.
  2. uncompress the downloaded package to the desired path.
  3. add the path in the include_path ini option.
  4. include mysqlAES.php file in your code.

* Use pear command

This method is needed root privileges., (*8)

bash [root@host ~]$ pear channel-discover pear.oops.org [root@host ~]$ pear install oops/mysqlAES [root@host ~]$ pear list -a, (*9)

* Use composer

first, make composer.json as follow:, (*10)

json { "require": { "joungkyun/mysqlaes": "2.*" } }, (*11)

and, install mysqlAES, (*12)

bash [user@host project]$ php composer.phpt install Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 1 installs, 0 updates, 0 removals - Installing joungkyun/mysqlaes (2.0.0): Downloading (100%) Writing lock file Generating autoload files [user@host project]$, (*13)

and, write code as follow:, (*14)

php , (*15)

APIs

See also mysqlAES reference pages. If you want to mysqlAES-1 reference, see also mysqlAES-1 reference pages., (*16)

  • (string|null) oops\Encrypt\mysqlAES::hex(STRING)
  • (string|null) oops\Encrypt\mysqlAES::unhex(STRING)
  • (string|null) oops\Encrypt\mysqlAES::encrypt(STRING, KEY)
  • (string|null) oops\Encrypt\mysqlAES::decrypt(ENCRYPTED_STRING, KEY)

Examples:


Reference

This class is compatible with follow APIs:, (*17)

The Versions

02/03 2018

dev-master

9999999-dev https://github.com/OOPS-ORG-PHP/mysqlAES

Support AES-256 encrypt and decrypt class APIs

  Sources   Download

BSD-2-Clause

The Requires

  • ext-openssl *
  • php >=7.1.0

 

02/03 2018

2.0.0

2.0.0.0 https://github.com/OOPS-ORG-PHP/mysqlAES

Support AES-256 encrypt and decrypt class APIs

  Sources   Download

BSD-2-Clause

The Requires

  • php >=7.1.0
  • ext-openssl *

 

02/03 2018

dev-mysqlAES-1

dev-mysqlAES-1 https://github.com/OOPS-ORG-PHP/mysqlAES

Support AES-256 encrypt and decrypt class APIs

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.0.0
  • ext-openssl *

 

25/02 2018

1.0.2

1.0.2.0 https://github.com/OOPS-ORG-PHP/mysqlAES

Support AES-256 encrypt and decrypt class APIs

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.0.0
  • ext-openssl *

 

16/02 2018

1.0.1

1.0.1.0 https://github.com/OOPS-ORG-PHP/mysqlAES

Support AES-256 encrypt and decrypt class APIs

  Sources   Download

BSD-2-Clause

The Requires