2017 © Pedro Peláez
 

library cryptography

A cryptography PHP 5.4 library.

image

claudusd/cryptography

A cryptography PHP 5.4 library.

  • Sunday, May 11, 2014
  • by claudusd
  • Repository
  • 3 Watchers
  • 1 Stars
  • 77 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Cryptography

This is a PHP5 library about the cryptography. The library uses the PHP openssl methods., (*1)

Build Status, (*2)

Installation

The recommended way to install Cryptography is through composer (claudusd/cryptography on packagist), (*3)

Just create a composer.json file for your project:, (*4)

``` json { "require": { "claudusd/cryptography": "*" } }, (*5)


And run these two commands to install it: ``` bash $ curl -sS https://getcomposer.org/installer | php $ composer install

Now you can add the autoloader, and you will have access to the library:, (*6)

``` php <?php, (*7)

require 'vendor/autoload.php'; ```, (*8)

Usage

Key Generation

This part of the library is used for key generation for the public key encryption., (*9)

The KeyGeneration abstract class have the methods getPrivateKey() to get the private key and getPublicKey() to get the public key., (*10)

Implementation

The library have a default implementation for generation key for RSA encryption with 4096 bits's lenght. Each instance of this class generates a new pair of key., (*11)

Encryption/Decryption

The class for encryption and decryption implement the interface EncryptionInterface and use two methods, encrypt() and decrypt()., (*12)

Implementation

By default the library have 2 implementations :, (*13)

  • The First is a symmectric key encryption with the algorythm AES 256 CBC.
  • The second is a public key encryption for any RSA' key lenght.

Hash

The class for hash implement the interface HashInterface and use the method hash()., (*14)

Implementation

By default the library implement the SHA1 hash., (*15)

Signature

The signature class implement the interface SignatureInterface and use two methods, sign() and verify()., (*16)

Implementation

By default the library implement the data sign with a private key and verify with a public key., (*17)

The Versions

11/05 2014

dev-master

9999999-dev

A cryptography PHP 5.4 library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Claude Dioudonnat

encryption signature cryptography openssl