This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
8 additions
and
280 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,5 @@ | ||
# Keboola PHP Encryption [![Build Status](https://travis-ci.org/keboola/php-encryption.png?branch=master)](https://travis-ci.org/keboola/php-encryption) | ||
[![Latest Stable Version](https://poser.pugx.org/keboola/php-encryption/v/stable.svg)](https://packagist.org/packages/keboola/php-encryption) | ||
[![License](https://poser.pugx.org/keboola/php-encryption/license.svg)](https://packagist.org/packages/keboola/php-encryption) | ||
[![Total Downloads](https://poser.pugx.org/keboola/php-encryption/downloads.svg)](https://packagist.org/packages/keboola/php-encryption) | ||
# Keboola PHP Encryption | ||
|
||
Wrapper for PHP [mcrypt](http://php.net/manual/en/book.mcrypt.php) encryption algorithms. | ||
**THIS LIBRARY IS DEPRECATED** | ||
|
||
## Currently supported ciphers | ||
* AES in CBC mode with [PKCS7 padding](http://en.wikipedia.org/wiki/Padding_(cryptography\)#PKCS7) | ||
* Encryption strength is determined by key length. Key lengths 16, 24, 32 corresponds with 128, 192, 256 bit encryption. | ||
|
||
## Usage | ||
|
||
```php | ||
use Keboola\Encryption\AesEncryptor; | ||
$encryptor = new AesEncryptor('UfhZPgPLpz7YVjXwNGTpUD8WpoddfpXn'); // 256 bit key | ||
$encryptedMessage = $encryptor->encrypt($inputMessage); | ||
``` | ||
|
||
## Resources | ||
* https://gist.github.com/RiANOl/1077723 | ||
* http://php.net/manual/en/function.mcrypt-encrypt.php | ||
* https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation | ||
* http://www.coderelic.com/2011/10/aes-256-encryption-with-php/ | ||
* http://en.wikipedia.org/wiki/Advanced_Encryption_Standard | ||
* http://blog.agilebits.com/2013/03/09/guess-why-were-moving-to-256-bit-aes-keys/ | ||
Please consider using [defuse/php-encryption](https://github.com/defuse/php-encryption) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
{ | ||
"name": "keboola/php-encryption", | ||
"description": "Mcrypt wrapper - AES encryption support", | ||
"description": "Mcrypt wrapper. This library is deprecated in favor of https://github.com/defuse/php-encryption", | ||
"license": "MIT", | ||
"keywords": ["security", "encryption", "AES", "mcrypt", "cipher"], | ||
"keywords": ["security", "encryption", "AES", "mcrypt", "cipher", "deprecated"], | ||
"authors": [ | ||
{ | ||
"name": "Martin Halamicek", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3", | ||
"ext-mcrypt": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"Keboola\\Encryption": "src/" | ||
} | ||
} | ||
"suggest": { | ||
"defuse/php-encryption": "Use this one for secure encryption." | ||
} | ||
} |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.